Bug #15475 | Replication of GET_LOCK() | ||
---|---|---|---|
Submitted: | 5 Dec 2005 4:43 | Modified: | 7 Nov 2007 9:59 |
Reporter: | Peter Zaitsev (Basic Quality Contributor) | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 4.1.17-BK, 4.1.15 | OS: | Linux (Linux) |
Assigned to: | Mats Kindahl | CPU Architecture: | Any |
[5 Dec 2005 4:43]
Peter Zaitsev
[5 Dec 2005 4:52]
Peter Zaitsev
OK. Found way to repeat it. The problem is you can use both ' and " in GET_LOCK while logged DO RELEASE_LOCK always used "" so if lock name contains " it results in broken query generated. Here is simple php code to repeat it: <? $x=mysql_connect('localhost','root',''); $a='abcdtest"'; $r=mysql_query("select get_lock('$a',10)"); ?>
[5 Dec 2005 9:33]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described on 4.1.17-BK (ChangeSet@1.2478, 2005-12-01 14:26:19+02:00): [openxs@Fedora 4.1]$ cat 15475.php <? $x=mysqli_connect('localhost','root',''); $a='abcdtest"'; $r=mysqli_query($x, "select get_lock('$a',10)"); ?> [openxs@Fedora 4.1]$ bin/mysqld_safe --log-bin=binlog & [1] 11694 [openxs@Fedora 4.1]$ Starting mysqld daemon with databases from /home/openxs/dbs/4.1/var [openxs@Fedora 4.1]$ php 15475.php Content-type: text/html X-Powered-By: PHP/5.0.5 [openxs@Fedora 4.1]$ bin/mysqladmin -uroot shutdown STOPPING server from pid file /home/openxs/dbs/4.1/var/Fedora.pid 051205 12:25:02 mysqld ended [1]+ Done bin/mysqld_safe --log-bin=binlog [openxs@Fedora 4.1]$ ls var/binlog.* var/binlog.000001 var/binlog.index [openxs@Fedora 4.1]$ bin/mysqlbinlog var/binlog.000001 /*!40019 SET @@session.max_insert_delayed_threads=0*/; # at 4 #051205 12:24:36 server id 1 log_pos 4 Start: binlog v 3, server v 4.1. 17-log created 051205 12:24:36 at startup # at 79 #051205 12:24:45 server id 1 log_pos 79 Query thread_id=1 exec_tim e=0 error_code=0 SET TIMESTAMP=1133778285; DO RELEASE_LOCK("abcdtest"");
[5 Nov 2007 13:06]
Mats Kindahl
The bug will be fixed in 5.0 and upward since 4.1 is under conditional support. If a fix in 4.1 is critical, please file a bug explicitly for fixing in 4.1.
[7 Nov 2007 9:59]
Mats Kindahl
This bug is not repeatable in 5.0 and is only present in 4.1. Since it is a minor bug, and 4.1 is under conditional support, this bug will not be fixed (in 4.1), and not in any later version since it just don't exist there.