List:Commits« Previous MessageNext Message »
From:Venkata Sidagam Date:April 9 2012 11:39am
Subject:bzr push into mysql-5.1 branch (venkata.sidagam:3718 to 3719) Bug#11766072
View as plain text  
 3719 Venkata Sidagam	2012-04-09
      Bug #11766072 59107: MYSQLSLAP CRASHES IF STARTED WITH NO ARGUMENTS ON WINDOWS
      
      This bug is a duplicate of Bug #31173, which was pushed to the 
      mysql-trunk 5.6 on 4th Aug, 2010. This is just a back-port of 
      the fix
     @ mysql-test/r/mysqlslap.result
        A test added as part of the fix for Bug #59107
     @ mysql-test/t/mysqlslap.test
        A test added as part of the fix for Bug #59107

    modified:
      client/mysqlslap.c
      mysql-test/r/mysqlslap.result
      mysql-test/t/mysqlslap.test
 3718 Mayank Prasad	2012-04-06
      BUG#13738989 : 62136 : FAILED TO FETCH SELECT RESULT USING EMBEDDED MYSQLD
      
      Background : 
      In mysql-5.1, in a fix for bug#47485, code has been changed for 
      mysql client (libmysql/libmysql.c) but corresponding code was not
      changed for embedded mysql. In that code change, after execution
      of a statement, mysql_stmt_store_result() checks for mysql->state
      to be MYSQL_STATUS_STATEMENT_GET_RESULT, instead of
      MYSQL_STATUS_GET_RESULT (earlier).
      
      Reason:
      In embedded mysql code, after execution, mysql->state was not
      set to MYSQL_STATUS_STATEMENT_GET_RESULT, so it was throwing
      OUT_OF_SYNC error.
      
      Fix:
      Fixed the code in libmysqld/lib_sql.cc to have mysql->state
      to be set to MYSQL_STATUS_STATEMENT_GET_RESULT after execution.

    modified:
      libmysqld/lib_sql.cc
=== modified file 'client/mysqlslap.c'
--- a/client/mysqlslap.c	2011-07-03 15:47:37 +0000
+++ b/client/mysqlslap.c	2012-04-09 11:12:41 +0000
@@ -143,7 +143,8 @@ static my_bool opt_compress= FALSE, tty_
 const char *auto_generate_sql_type= "mixed";
 
 static unsigned long connect_flags= CLIENT_MULTI_RESULTS |
-                                    CLIENT_MULTI_STATEMENTS;
+                                    CLIENT_MULTI_STATEMENTS |
+                                    CLIENT_REMEMBER_OPTIONS;
 
 static int verbose, delimiter_length;
 static uint commit_rate;

=== modified file 'mysql-test/r/mysqlslap.result'
--- a/mysql-test/r/mysqlslap.result	2011-04-08 06:52:44 +0000
+++ b/mysql-test/r/mysqlslap.result	2012-04-09 11:12:41 +0000
@@ -245,3 +245,13 @@ mtr
 mysql
 test
 DROP DATABASE bug58090;
+#
+# Bug #11766072 - 59107: MYSQLSLAP CRASHES IF STARTED WITH NO ARGUMENTS ON WINDOWS
+#
+Benchmark
+	Average number of seconds to run all queries: TIME seconds
+	Minimum number of seconds to run all queries: TIME seconds
+	Maximum number of seconds to run all queries: TIME seconds
+	Number of clients running queries: 1
+	Average number of queries per client: 0
+

=== modified file 'mysql-test/t/mysqlslap.test'
--- a/mysql-test/t/mysqlslap.test	2011-04-08 06:52:44 +0000
+++ b/mysql-test/t/mysqlslap.test	2012-04-09 11:12:41 +0000
@@ -1,6 +1,5 @@
 # Can't run test of external client with embedded server
 --source include/not_embedded.inc
---source include/not_windows.inc
 
 --exec $MYSQL_SLAP --silent --concurrency=5 --iterations=20 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql
 
@@ -37,7 +36,7 @@
 
 --exec $MYSQL_SLAP --only-print --delimiter=";" --query="select * from t1;select * from t2" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32)); INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --engine="heap,myisam" --post-query="SHOW TABLES" --pre-query="SHOW TABLES";
 
- --exec $MYSQL_SLAP --only-print --delimiter=";" --query="select * from t1;select * from t2" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32)); INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --engine="heap,myisam" --post-query="SHOW TABLES" --pre-query="SHOW TABLES" --number-of-queries=6 --commit=1;
+ --exec $MYSQL_SLAP --only-print --delimiter=";" --query="select * from t1;select * from t2" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32)); INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --engine="heap,myisam" --post-query="SHOW TABLES" --pre-query="SHOW TABLES" --number-of-queries=6 --commit=1
 
 --exec $MYSQL_SLAP --silent --concurrency=5 --iterations=1 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=write --detach=2
 
@@ -68,3 +67,9 @@ SHOW DATABASES;
 SHOW DATABASES;
 DROP DATABASE bug58090;
 
+--echo #
+--echo # Bug #11766072 - 59107: MYSQLSLAP CRASHES IF STARTED WITH NO ARGUMENTS ON WINDOWS
+--echo #
+
+--replace_regex /queries: [0-9]+.[0-9]+/queries: TIME/
+--exec $MYSQL_SLAP

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (venkata.sidagam:3718 to 3719) Bug#11766072Venkata Sidagam10 Apr