List:Commits« Previous MessageNext Message »
From:Brian Aker Date:August 9 2007 10:01pm
Subject:bk commit into 5.1 tree (brian:1.2570) BUG#29803
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of brian. When brian does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-09 13:01:29-07:00, brian@stripped +2 -0
  Two bugs in one! The count call was duplicating internally the counts for loaded tests
(not autosql tests, just loaded). This could manifest itself by executing by file, or by
executing a pre statement.
  BUG#29803

  client/mysqlslap.c@stripped, 2007-08-09 13:01:27-07:00, brian@stripped +9 -10
    1) Declared VOID on pre/post statement return values (we were not using the return
value and I prefer to see this declared explicitly)
    2) Removed extra count call which was causing duplication of rows with parsed files
examples.

  mysql-test/r/mysqlslap.result@stripped, 2007-08-09 13:01:27-07:00, brian@stripped
+2 -2
    The additional selects come from fixing the pre return count call. Dropping the final
select is a result of fixing the true count.

diff -Nrup a/client/mysqlslap.c b/client/mysqlslap.c
--- a/client/mysqlslap.c	2007-06-15 17:22:51 -07:00
+++ b/client/mysqlslap.c	2007-08-09 13:01:27 -07:00
@@ -1407,15 +1407,15 @@ get_options(int *argc,char ***argv)
     tmp_string[sbuf.st_size]= '\0';
     my_close(data_file,MYF(0));
     if (user_supplied_pre_statements)
-      actual_queries= parse_delimiter(tmp_string, &pre_statements,
-                                      delimiter[0]);
+      (void)parse_delimiter(tmp_string, &pre_statements,
+                            delimiter[0]);
     my_free(tmp_string, MYF(0));
   } 
   else if (user_supplied_pre_statements)
   {
-    actual_queries= parse_delimiter(user_supplied_pre_statements,
-                                    &pre_statements,
-                                    delimiter[0]);
+    (void)parse_delimiter(user_supplied_pre_statements,
+                          &pre_statements,
+                          delimiter[0]);
   }
 
   if (user_supplied_post_statements && my_stat(user_supplied_post_statements,
&sbuf, MYF(0)))
@@ -1438,14 +1438,14 @@ get_options(int *argc,char ***argv)
     tmp_string[sbuf.st_size]= '\0';
     my_close(data_file,MYF(0));
     if (user_supplied_post_statements)
-      parse_delimiter(tmp_string, &post_statements,
-                      delimiter[0]);
+      (void)parse_delimiter(tmp_string, &post_statements,
+                            delimiter[0]);
     my_free(tmp_string, MYF(0));
   } 
   else if (user_supplied_post_statements)
   {
-    parse_delimiter(user_supplied_post_statements, &post_statements,
-                    delimiter[0]);
+    (void)parse_delimiter(user_supplied_post_statements, &post_statements,
+                          delimiter[0]);
   }
 
   if (verbose >= 2)
@@ -1993,7 +1993,6 @@ parse_delimiter(const char *script, stat
     ptr+= retstr - ptr + 1;
     if (isspace(*ptr))
       ptr++;
-    count++;
   }
 
   if (ptr != script+length)
diff -Nrup a/mysql-test/r/mysqlslap.result b/mysql-test/r/mysqlslap.result
--- a/mysql-test/r/mysqlslap.result	2007-06-15 17:22:51 -07:00
+++ b/mysql-test/r/mysqlslap.result	2007-08-09 13:01:27 -07:00
@@ -129,7 +129,6 @@ INSERT INTO t1 VALUES (1, 'This is a tes
 insert into t2 values ('test', 'test2');
 select * from t1;
 select * from t2;
-select * from t1;
 DROP SCHEMA IF EXISTS `mysqlslap`;
 DROP SCHEMA IF EXISTS `mysqlslap`;
 CREATE SCHEMA `mysqlslap`;
@@ -141,7 +140,6 @@ INSERT INTO t1 VALUES (1, 'This is a tes
 insert into t2 values ('test', 'test2');
 select * from t1;
 select * from t2;
-select * from t1;
 DROP SCHEMA IF EXISTS `mysqlslap`;
 DROP SCHEMA IF EXISTS `mysqlslap`;
 CREATE SCHEMA `mysqlslap`;
@@ -153,6 +151,7 @@ INSERT INTO t1 VALUES (1, 'This is a tes
 insert into t2 values ('test', 'test2');
 SHOW TABLES;
 select * from t1;
+select * from t2;
 SHOW TABLES;
 DROP SCHEMA IF EXISTS `mysqlslap`;
 DROP SCHEMA IF EXISTS `mysqlslap`;
@@ -165,6 +164,7 @@ INSERT INTO t1 VALUES (1, 'This is a tes
 insert into t2 values ('test', 'test2');
 SHOW TABLES;
 select * from t1;
+select * from t2;
 SHOW TABLES;
 DROP SCHEMA IF EXISTS `mysqlslap`;
 DROP SCHEMA IF EXISTS `mysqlslap`;
Thread
bk commit into 5.1 tree (brian:1.2570) BUG#29803Brian Aker9 Aug