Comment 0 for bug 1360942

Roel Van de Paar (roel11) wrote :

Testcase:

LOCK TABLES FOR BACKUP;
CREATE VIEW a AS SELECT *;

Result:

mysql> CREATE VIEW a AS SELECT *;
ERROR 1884 (HY000): Can't execute the query because you have a conflicting backup lock

Which at first sight looks perfectly normal. Yet, tee (mysql CLI TEE command) the output and hexdump it. Notice (** highlight added):

[roel@localhost Percona-Server-5.6.19-rel67.0-648-debug.Linux.x86_64]$ hexdump -C out.txt
000000f0 53 20 53 45 4c 45 43 54 20 2a 3b 0a 45 52 52 4f |S SELECT *;.ERRO|
00000100 52 20 31 38 38 34 20 28 48 59 30 30 30 29 3a 20 |R 1884 (HY000): |
00000110 43 61 6e **e2 80 99** 74 20 65 78 65 63 75 74 65 20 |Can...t execute | <------ (!!)
00000120 74 68 65 20 71 75 65 72 79 20 62 65 63 61 75 73 |the query becaus|
00000130 65 20 79 6f 75 20 68 61 76 65 20 61 20 63 6f 6e |e you have a con|
00000140 66 6c 69 63 74 69 6e 67 20 62 61 63 6b 75 70 20 |flicting backup |
00000150 6c 6f 63 6b 0a 6d 79 73 71 6c 3e 20 65 78 69 74 |lock.mysql> exit|
00000160 0a 0a 45 52 52 4f 52 20 31 38 38 34 20 28 48 59 |..ERROR 1884 (HY|
00000170 30 30 30 29 3a 20 43 61 6e **27** 74 20 65 78 65 63 |000): Can't exec| <------ (!)
00000180 75 74 65 20 74 68 65 20 71 75 65 72 79 20 62 65 |ute the query be|
00000190 63 61 75 73 65 20 79 6f 75 20 68 61 76 65 20 61 |cause you have a|
000001a0 20 63 6f 6e 66 6c 69 63 74 69 6e 67 20 62 61 63 | conflicting bac|

The (!!) part is the CLI TEE dump of the command, the (!) one is just a copy/paste in the out.txt file and replacing the ' that is there with a normal ASCII '.

So, it looks like a duck, it waggles like a duck and it kweks like a duck, but it's not a duck :) This was a fun bug to find :)

This causes STATUS_DATABASE_CORRUPTION RQG errors;

# 2014-08-25T17:46:48 Query: CREATE VIEW m AS SELECT * FROM `E` failed: 1884 Can<92>t execute the query because you have a conflicting backup lock
# 2014-08-25T17:46:48 Error: 'Can<92>t execute the query because you have a conflicting backup lock' indicates memory corruption. Note that this may be a false alarm if the test contains non-ascii character sets and non-alphanumeric characters.
# 2014-08-25T17:46:49 Killing periodic reporting process with pid 3538...
# 2014-08-25T17:46:49 Kill GenTest::ErrorFilter(3537)
# 2014-08-25T17:46:49 Test completed with failure status STATUS_DATABASE_CORRUPTION (105)

And is a QA blocker bug.

(In RQG, the ErrorMessageCorruption.pm sees the non-ASCII characters and reports it as corruption - even if incorrectly reported as memory/DB corruption).