Bug #58709 | assert in mysql_execute_command | ||
---|---|---|---|
Submitted: | 3 Dec 2010 16:44 | Modified: | 24 Mar 2011 22:45 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | 5.6.1-m5-debug-log | OS: | Any |
Assigned to: | Jon Olav Hauglid | CPU Architecture: | Any |
Tags: | assert, prepared statement, PROCEDURE |
[3 Dec 2010 16:44]
Matthias Leich
[3 Dec 2010 17:17]
Valeriy Kravchuk
Verified just as described with current mysql-trunk tree on Mac OS X: macbook-pro:mysql-test openxs$ ./mtr bug58709 Logging: ./mtr bug58709 101203 19:16:03 [Warning] Setting lower_case_table_names=2 because file system for /var/folders/dX/dXCzvuSlHX4Op1g-o1jIWk+++TI/-Tmp-/Tmt6lBi0mZ/ is case insensitive 101203 19:16:03 [Note] Plugin 'FEDERATED' is disabled. 101203 19:16:03 [Note] Plugin 'ndbcluster' is disabled. MySQL Version 5.6.1 Checking supported features... - skipping ndbcluster - SSL connections supported - binaries are debug compiled Collecting tests... vardir: /Users/openxs/dbs/trunk/mysql-test/var Checking leftover processes... Removing old var directory... Creating var directory '/Users/openxs/dbs/trunk/mysql-test/var'... Installing system database... Using server port 59309 ============================================================================== TEST RESULT TIME (ms) ------------------------------------------------------------ worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 main.bug58709 [ fail ] Test ended at 2010-12-03 19:16:19 CURRENT_TEST: main.bug58709 mysqltest: At line 19: query 'EXECUTE stm' failed: 2013: Lost connection to MySQL server during query The result from queries just before the failure was: DROP TABLE IF EXISTS t2, t1; DROP PROCEDURE IF EXISTS proc1; CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE= InnoDB; CREATE TABLE t2 ( i INT NOT NULL, FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION ) ENGINE= InnoDB; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); CREATE PROCEDURE proc1() DELETE IGNORE FROM t1 WHERE i = 1; PREPARE stm FROM 'CALL proc1()'; Server [mysqld.1 - pid: 25582, winpid: 25582, exit: 256] failed during test run Server log from this test: ----------SERVER LOG START----------- 101203 20:16:11 [Warning] Setting lower_case_table_names=2 because file system for /Users/openxs/dbs/trunk/mysql-test/var/mysqld.1/data/ is case insensitive 101203 20:16:11 [Note] Plugin 'FEDERATED' is disabled. 101203 20:16:11 [Note] Plugin 'ndbcluster' is disabled. InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use GCC atomic builtins InnoDB: Compressed tables use zlib 1.2.3 101203 20:16:11 InnoDB: Initializing buffer pool, size = 8.0M 101203 20:16:11 InnoDB: Completed initialization of buffer pool 101203 20:16:11 InnoDB: highest supported file format is Barracuda. 101203 20:16:11 InnoDB: 1.2.0 started; log sequence number 1595675 101203 20:16:11 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 06af6e7c-ff01-11df-ac5d-28e8129fe7a9. 101203 20:16:11 [Note] Event Scheduler: Loaded 0 events 101203 20:16:11 [Note] /Users/openxs/dbs/trunk/libexec/mysqld: ready for connections. Version: '5.6.1-m5-debug-log' socket: '/Users/openxs/dbs/trunk/mysql-test/var/tmp/mysqld.1.sock' port: 13000 Source distribution Assertion failed: (thd->is_error() || thd->killed), function mysql_execute_command, file sql_parse.cc, line 3973. 101203 20:16:12 - mysqld got signal 6 ; ...
[19 Jan 2011 9:58]
Jon Olav Hauglid
Prepared statement is not needed to reproduce. Simply doing CALL proc1() is enough.
[19 Jan 2011 12:12]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/129173 3532 Jon Olav Hauglid 2011-01-19 Bug #58709 assert in mysql_execute_command The triggered assert checks that either an error has been reported or the statement has been killed if execution of a stored routine fails. It was triggered if a stored routine had a DELETE IGNORE statement which failed but due to IGNORE had not reported any error. This patch fixes the problem by changing mysql_delete() to return a value indicating failure only if an error has been reported or the statement has been killed. Test case added to delete.test.
[2 Feb 2011 10:33]
Bugs System
Pushed into mysql-trunk 5.6.2 (revid:jon.hauglid@oracle.com-20110202103221-y9rsy95eujvyjx4u) (version source revid:jon.hauglid@oracle.com-20110202103221-y9rsy95eujvyjx4u) (merge vers: 5.6.2) (pib:24)
[2 Feb 2011 10:33]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/130197 3590 Jon Olav Hauglid 2011-02-02 Bug #58709 assert in mysql_execute_command The triggered assert checks that either an error has been reported or the statement has been killed if execution of a stored routine fails. It was triggered if a stored routine had a DELETE IGNORE statement which failed but due to IGNORE had not reported any error. This patch fixes the problem by changing mysql_delete() to return a value indicating failure only if an error has been reported or the statement has been killed. Test case added to delete.test.
[24 Mar 2011 22:45]
Paul DuBois
Noted in 5.6.2 changelog. An assertion was raised if a stored routine had a DELETE IGNORE statement that failed but due to the IGNORE had not reported any error. CHANGESET - http://lists.mysql.com/commits/130197