Assertion `0' failed in my_message_sql on UPDATE IGNORE, or unknown error on release build

Bug #976104 reported by Elena Stepanova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Sergei Golubchik

Bug 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 );

# End of test case

Tags: assertion
Revision history for this message
Elena Stepanova (elenst) wrote :

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

Changed in maria:
assignee: nobody → Sergei (sergii)
Elena Stepanova (elenst)
description: updated
Elena Stepanova (elenst)
Changed in maria:
assignee: Sergei (sergii) → Michael Widenius (monty)
Changed in maria:
assignee: Michael Widenius (monty) → Sergei (sergii)
status: New → Fix Committed
Revision history for this message
Elena Stepanova (elenst) wrote :

Fix released in 5.3.7 and 5.5.24

Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.