3299 Marc Alff 2011-07-25
Improved test robustness
modified:
mysql-test/suite/perfschema/t/stage_mdl_function.test
mysql-test/suite/perfschema/t/stage_mdl_global.test
mysql-test/suite/perfschema/t/stage_mdl_procedure.test
mysql-test/suite/perfschema/t/stage_mdl_table.test
3298 Magne Mahre 2011-07-25
Bug#12546960 - 60993: NAME QUOTED WITH QUOTE INSTEAD OF BACKTICK
GIVES NO SYNTAX ERROR
If a statement ended with mismatched quotes, the server would
accept the statement and present whatever was after the
initial quote as a text string.
In the particular bug report, the string was started with a
backtick. Since the concluding quote was a regular 'tick',
it was not detected as and ending quote, so the tick was
added to the string.
The bug was not present when used interactively from the
mysql client, nor from mysqltest, as these tools do some
rudimentary quotes checking before sending the statement
to the server.
The fix introduces a check to verify that the statement
does not end while still expecting an end quote. If so -
a parser error is returned.
modified:
mysql-test/r/parser.result
mysql-test/t/parser.test
sql/sql_lex.cc
=== modified file 'mysql-test/suite/perfschema/t/stage_mdl_function.test'
--- a/mysql-test/suite/perfschema/t/stage_mdl_function.test 2011-07-21 16:27:14 +0000
+++ b/mysql-test/suite/perfschema/t/stage_mdl_function.test 2011-07-25 14:05:36 +0000
@@ -38,7 +38,14 @@ drop function test.f1;
--connection default
-# Wait for the drop function to block
+# user1: Wait for the statement to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user1'
+ and PROCESSLIST_COMMAND = 'Sleep';
+--source include/wait_condition.inc
+
+# user2: Wait for the drop function to block
let $wait_condition=
select count(*) = 1 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user2'
=== modified file 'mysql-test/suite/perfschema/t/stage_mdl_global.test'
--- a/mysql-test/suite/perfschema/t/stage_mdl_global.test 2011-07-21 16:27:14 +0000
+++ b/mysql-test/suite/perfschema/t/stage_mdl_global.test 2011-07-25 14:05:36 +0000
@@ -30,7 +30,14 @@ insert into test.t1 values (1), (2), (3)
--connection default
-# Wait for the insert to block
+# user1: Wait for the statement to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user1'
+ and PROCESSLIST_COMMAND = 'Sleep';
+--source include/wait_condition.inc
+
+# user2: Wait for the insert to block
let $wait_condition=
select count(*) = 1 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user2'
=== modified file 'mysql-test/suite/perfschema/t/stage_mdl_procedure.test'
--- a/mysql-test/suite/perfschema/t/stage_mdl_procedure.test 2011-07-21 16:27:14 +0000
+++ b/mysql-test/suite/perfschema/t/stage_mdl_procedure.test 2011-07-25 14:05:36 +0000
@@ -52,7 +52,14 @@ drop procedure test.p1;
--connection default
-# Wait for the drop procedure to block
+# user1: Wait for the statement to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user1'
+ and PROCESSLIST_COMMAND = 'Sleep';
+--source include/wait_condition.inc
+
+# user2: Wait for the drop procedure to block
let $wait_condition=
select count(*) = 1 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user2'
=== modified file 'mysql-test/suite/perfschema/t/stage_mdl_table.test'
--- a/mysql-test/suite/perfschema/t/stage_mdl_table.test 2011-07-21 16:27:14 +0000
+++ b/mysql-test/suite/perfschema/t/stage_mdl_table.test 2011-07-25 14:05:36 +0000
@@ -35,7 +35,14 @@ alter table test.t1 add column (b int);
--connection default
-# Wait for the alter to block
+# user1: Wait for the statement to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user1'
+ and PROCESSLIST_COMMAND = 'Sleep';
+--source include/wait_condition.inc
+
+# user2: Wait for the alter to block
let $wait_condition=
select count(*) = 1 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user2'
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (marc.alff:3298 to 3299) | Marc Alff | 25 Jul |