mysql-connector-java/remove-StatementsTest.patch
2021-10-19 15:58:32 +02:00

86 lines
3.2 KiB
Diff

From b113bc5ed38da669a0cf2b88bf35905218b01cfd Mon Sep 17 00:00:00 2001
From: Zuzana Miklankova <zmiklank@redhat.com>
Date: Tue, 19 Oct 2021 15:31:36 +0200
Subject: [PATCH] removing StatementsTest because of missing dependencies
---
.../regression/StatementRegressionTest.java | 51 -------------------
1 file changed, 51 deletions(-)
diff --git a/src/test/java/testsuite/regression/StatementRegressionTest.java b/src/test/java/testsuite/regression/StatementRegressionTest.java
index 5845c71e..f68fd9dd 100644
--- a/src/test/java/testsuite/regression/StatementRegressionTest.java
+++ b/src/test/java/testsuite/regression/StatementRegressionTest.java
@@ -151,7 +151,6 @@ import com.mysql.cj.util.TimeUtil;
import testsuite.BaseQueryInterceptor;
import testsuite.BaseTestCase;
import testsuite.UnreliableSocketFactory;
-import testsuite.simple.StatementsTest;
/**
* Regression tests for the Statement class
@@ -11599,21 +11598,6 @@ public class StatementRegressionTest extends BaseTestCase {
}
}
- /**
- * Tests fix for Bug#23204652, CURSOR POSITIONING API'S DOESNOT CHECK THE VALIDITY OF RESULTSET.
- *
- * @throws Exception
- *
- * @see StatementsTest#testResultSetProducingQueries()
- */
- @Test
- public void testBug23204652() throws Exception {
- assertThrows(SQLException.class, "Statement\\.executeQuery\\(\\) cannot issue statements that do not produce result sets\\.", () -> {
- this.stmt.executeQuery("DO 1 + 2");
- return null;
- });
- }
-
/**
* Tests fix for Bug#71929 (18346501), Prefixing query with double comments cancels query DML validation.
*
@@ -11639,39 +11623,4 @@ public class StatementRegressionTest extends BaseTestCase {
});
}
}
-
- /**
- * Test fix for Bug#103612 (32902019), Incorrectly identified WITH...SELECT as unsafe for read-only connections.
- *
- * @throws Exception
- *
- * @see StatementsTest#testReadOnlySafeStatements()
- */
- @Test
- public void testBug103612() throws Exception {
- assumeTrue(versionMeetsMinimum(8, 0, 1), "MySQL 8.0.1+ is required to run this test.");
-
- createTable("testBug103612", "(id INT)");
- String query = "WITH cte AS (SELECT * FROM testBug103612) SELECT * FROM cte";
-
- boolean useSPS = false;
- boolean readOnly = false;
- do {
- final String testCase = String.format("Case [SPS: %s, ReadOnly: %s]", useSPS ? "Y" : "N", readOnly ? "Y" : "N");
-
- Properties props = new Properties();
- props.setProperty(PropertyKey.useServerPrepStmts.getKeyName(), Boolean.toString(useSPS));
- Connection testConn = getConnectionWithProps(props);
- testConn.setReadOnly(readOnly);
-
- try (Statement testStmt = testConn.createStatement()) {
- assertTrue(testStmt.execute(query), testCase);
- }
- try (PreparedStatement testPstmt = testConn.prepareStatement(query)) {
- assertTrue(testPstmt.execute(), testCase);
- }
-
- testConn.close();
- } while ((useSPS = !useSPS) || (readOnly = !readOnly));
- }
}
--
2.31.1