This is an automated email from the ASF dual-hosted git repository.

eldenmoon pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new dfb5a6fdc79 [regression-test](prepared_stmt_p0) use master ip for 
prepared url (#42521) (#42567)
dfb5a6fdc79 is described below

commit dfb5a6fdc7917c8f85e4294b17dff6a3a005d135
Author: lihangyu <[email protected]>
AuthorDate: Mon Oct 28 17:47:55 2024 +0800

    [regression-test](prepared_stmt_p0) use master ip for prepared url (#42521) 
(#42567)
    
    (#42521)
---
 .../suites/prepared_stmt_p0/prepared_stmt.groovy        | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy 
b/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy
index 47e303d2e0c..a06e0e78cf2 100644
--- a/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy
+++ b/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy
@@ -22,7 +22,8 @@ suite("test_prepared_stmt", "nonConcurrent") {
     def tableName = "tbl_prepared_stmt"
     def user = context.config.jdbcUser
     def password = context.config.jdbcPassword
-    def url = context.config.jdbcUrl + 
"&useServerPrepStmts=true&useCursorFetch=true"
+    // def url = context.config.jdbcUrl + 
"&useServerPrepStmts=true&useCursorFetch=true"
+    String url = getServerPrepareJdbcUrl(context.config.jdbcUrl, 
"regression_test_prepared_stmt_p0")
     def result1 = connect(user=user, password=password, url=url) {
         sql """DROP TABLE IF EXISTS ${tableName} """
         sql """
@@ -221,13 +222,15 @@ suite("test_prepared_stmt", "nonConcurrent") {
         stmt_read = prepareStatement "insert into mytable1 with xxx_label 
12222 values(?, ?, ?, ?)" 
         assertEquals(stmt_read.class, 
com.mysql.cj.jdbc.ClientPreparedStatement);
         // alter stmt
-        stmt_read = prepareStatement "alter table mytable1 rename mytable2" 
-        // assertEquals(stmt_read.class, 
com.mysql.cj.jdbc.ClientPreparedStatement);
+        stmt_read = prepareStatement "alter table mytable1 rename mytable2"
+        def result = stmt_read.execute()
+        logger.info("result: ${result}")
+        // assertEquals(com.mysql.cj.jdbc.ClientPreparedStatement, 
stmt_read.class)
         // update stmt
         stmt_read = prepareStatement "update tbl_prepared_stmt set k5 = ?" 
         assertEquals(stmt_read.class, 
com.mysql.cj.jdbc.ServerPreparedStatement);
         stmt_read.setString(1, "2021-01-01")
-        def result = stmt_read.execute()
+        result = stmt_read.execute()
         logger.info("result: ${result}")
         stmt_read = prepareStatement "update tbl_prepared_stmt set k4 = 'Will 
we ignore LIMIT ?,?'" 
         assertEquals(stmt_read.class, 
com.mysql.cj.jdbc.ServerPreparedStatement);
@@ -235,10 +238,10 @@ suite("test_prepared_stmt", "nonConcurrent") {
         logger.info("result: ${result}")
         qt_sql "select * from tbl_prepared_stmt where k4 = 'Will we ignore 
LIMIT ?,?' order by k1"
         // show create table
-        stmt_read = prepareStatement "SHOW CREATE TABLE mytable1" 
-        // assertEquals(stmt_read.class, 
com.mysql.cj.jdbc.ClientPreparedStatement);
+        stmt_read = prepareStatement "SHOW CREATE TABLE tbl_prepared_stmt"
         result = stmt_read.execute()
-        logger.info("show : ${result}")
+        logger.info("result: ${result}")
+        // assertEquals(com.mysql.cj.jdbc.ClientPreparedStatement, 
stmt_read.class)
         // not stable
         // qe_select16 stmt_read
         stmt_read.close()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to