[MDEV-3513] LP:976104 - Assertion `0' failed in my_message_sql on UPDATE IGNORE, or unknown error on release build Created: 2012-04-07  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug976104.xml    

 Description   

mysqld: mysqld.cc:3008: int my_message_sql(uint, const char*, myf): Assertion `0' failed.

#8 0xb7448014 in __assert_fail () from /lib/libc.so.6
#9 0x082d0fed in my_message_sql (error=1105, str=0xae8c0444 "Unknown error",
    MyFlags=0) at mysqld.cc:3008
#10 0x087c9236 in my_error (nr=1105, MyFlags=0) at my_error.c:102
#11 0x083af0f2 in multi_update::send_error (this=0x948cb30, errcode=1105,
    err=0x934c280 "Unknown error") at sql_update.cc:1897
#12 0x083ad429 in mysql_multi_update (thd=0x93ec740, table_list=0x948b7a0,
    fields=0x93ee248, values=0x93ee4b0, conds=0x948ca20, options=0,
    handle_duplicates=DUP_ERROR, ignore=true, unit=0x93edec0,
    select_lex=0x93ee1b4) at sql_update.cc:1298
#13 0x082e59e5 in mysql_execute_command (thd=0x93ec740) at sql_parse.cc:3179
#14 0x082ee50c in mysql_parse (thd=0x93ec740,
    rawbuf=0x948b680 "UPDATE IGNORE t1, t2 SET b = 'bar', c = 'bar' \nWHERE a != ( SELECT 1 UNION SELECT 2 )", length=85, found_semicolon=0xae8c1234)
    at sql_parse.cc:6152
#15 0x082e0eed in dispatch_command (command=COM_QUERY, thd=0x93ec740,
    packet=0x94442a9 "UPDATE IGNORE t1, t2 SET b = 'bar', c = 'bar' \nWHERE a != ( SELECT 1 UNION SELECT 2 )", packet_length=85) at sql_parse.cc:1228
#16 0x082e0397 in do_command (thd=0x93ec740) at sql_parse.cc:923
#17 0x082dd28d in handle_one_connection (arg=0x93ec740) at sql_connect.cc:1218
#18 0xb76d6b25 in start_thread () from /lib/libpthread.so.0

bzr version-info
revision-id: <email address hidden>
date: 2012-04-07 02:29:04 -0700
build-date: 2012-04-07 21:47:49 +0400
revno: 3499

Notes:
5.5 also fails, although the assertion is different, but it might be because recent 5.3 changes have not reached 5.5 main tree yet.
On release (as non-debug) build there is no crash, but server error log contains "Unknown error" (which is normally a part of the warning ignored due to the IGNORE modifier).
Could not reproduce on MariaDB 5.2, MySQL 5.5, MySQL trunk (revno 3706).

Test case:

CREATE TABLE t1 ( a INT, b CHAR(3) );
INSERT INTO t1 VALUES ( 1, 'foo' );
CREATE TABLE t2 ( c CHAR(3), d INT );
INSERT INTO t2 VALUES ( 'foo', 1 );

UPDATE IGNORE t1, t2 SET b = 'bar', c = 'bar'
  WHERE a != ( SELECT 1 UNION SELECT 2 );

  1. End of test case


 Comments   
Comment by Elena Stepanova [ 2012-04-07 ]

Assertion `0' failed in my_message_sql on UPDATE IGNORE, or unknown error on release build
#8 0xb7448014 in __assert_fail () from /lib/libc.so.6
#9 0x082d0fed in my_message_sql (error=1105, str=0xae8c0444 "Unknown error",
MyFlags=0) at mysqld.cc:3008
#10 0x087c9236 in my_error (nr=1105, MyFlags=0) at my_error.c:102
#11 0x083af0f2 in multi_update::send_error (this=0x948cb30, errcode=1105,
err=0x934c280 "Unknown error") at sql_update.cc:1897
#12 0x083ad429 in mysql_multi_update (thd=0x93ec740, table_list=0x948b7a0,
fields=0x93ee248, values=0x93ee4b0, conds=0x948ca20, options=0,
handle_duplicates=DUP_ERROR, ignore=true, unit=0x93edec0,
select_lex=0x93ee1b4) at sql_update.cc:1298
#13 0x082e59e5 in mysql_execute_command (thd=0x93ec740) at sql_parse.cc:3179
#14 0x082ee50c in mysql_parse (thd=0x93ec740,
rawbuf=0x948b680 "UPDATE IGNORE t1, t2 SET b = 'bar', c = 'bar' \nWHERE a != ( SELECT 1 UNION SELECT 2 )", length=85, found_semicolon=0xae8c1234)
at sql_parse.cc:6152
#15 0x082e0eed in dispatch_command (command=COM_QUERY, thd=0x93ec740,
packet=0x94442a9 "UPDATE IGNORE t1, t2 SET b = 'bar', c = 'bar' \nWHERE a != ( SELECT 1 UNION SELECT 2 )", packet_length=85) at sql_parse.cc:1228
#16 0x082e0397 in do_command (thd=0x93ec740) at sql_parse.cc:923
#17 0x082dd28d in handle_one_connection (arg=0x93ec740) at sql_connect.cc:1218
#18 0xb76d6b25 in start_thread () from /lib/libpthread.so.0

bzr version-info
revision-id: igor@askmonty.org-20120407092904-nnwqfwtt2g5ia8gr
date: 2012-04-07 02:29:04 -0700
build-date: 2012-04-07 21:47:49 +0400
revno: 3499

Notes:
5.5 also fails, although the assertion is different, but it might be because recent 5.3 changes have not reached 5.5 main tree yet.
On release (as non-debug) build there is no crash, but server error log contains "Unknown error" (which is normally a part of the warning ignored due to the IGNORE modifier).
Could not reproduce on MariaDB 5.2, MySQL 5.5, MySQL trunk (revno 3706).

Test case:

CREATE TABLE t1 ( a INT, b CHAR(3) );
INSERT INTO t1 VALUES ( 1, 'foo' );
CREATE TABLE t2 ( c CHAR(3), d INT );
INSERT INTO t2 VALUES ( 'foo', 1 );

UPDATE IGNORE t1, t2 SET b = 'bar', c = 'bar'
WHERE a != ( SELECT 1 UNION SELECT 2 );

  1. End of test case
Comment by Elena Stepanova [ 2012-04-07 ]

Re: Assertion `0' failed in my_message_sql on UPDATE IGNORE, or unknown error on release build
Setting to 'High' rather than 'Critical' because it's a debug assertion, no crash on the release build, only an error message in the log file.

Also filed in JIRA as https://mariadb.atlassian.net/browse/MDEV-216

Comment by Elena Stepanova [ 2012-06-24 ]

Re: Assertion `0' failed in my_message_sql on UPDATE IGNORE, or unknown error on release build
Fix released in 5.3.7 and 5.5.24

Comment by Rasmus Johansson (Inactive) [ 2012-06-24 ]

Launchpad bug id: 976104

Generated at Thu Feb 08 06:49:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.