mariadb/sql
Konstantin Osipov f130de4fb8 A patch and a test case for
Bug#46539 Various crashes on INSERT IGNORE SELECT + SELECT FOR UPDATE.

If a transaction was rolled back inside InnoDB due to a deadlock
or lock wait timeout, and the statement had IGNORE clause,
the server could crash at the end of the statement or on shutdown.

This was caused by the error handling infrastructure's attempt to 
ignore a non-ignorable error.

When a transaction rollback request is raised, switch off 
current_select->no_error flag, so that the following error
won't be ignored.

Instead, we could add !thd->is_fatal_sub_stmt_error to
my_message_sql(), but since in write_record() we switch
off no_error, the same approach is used in 
thd_mark_transaction_to_rollback().

@todo: call thd_mark_transaction_to_rollback() from 
handler::print_error(), then we can easily make sure
that the error reported by print_error is not ignored.

mysql-test/r/innodb_lock_wait_timeout_1.result:
  Update results (Bug#46539).
mysql-test/t/innodb_lock_wait_timeout_1.test:
  Add a test case for Bug#46539
sql/sql_class.cc:
  When a transaction rollback request is raised, switch of 
  current_select->no_error flag, so that the following error
  won't be ignored.
2009-10-28 17:49:56 +03:00
..
examples Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-06-17 15:54:01 +02:00
share WL#4259 - Debug Sync Facility 2009-09-29 17:38:40 +02:00
.cvsignore
add_errmsg
authors.h
client_settings.h Bug#46013: rpl_extraColmaster_myisam fails on pb2 2009-08-13 17:07:20 -03:00
CMakeLists.txt WL#4259 - Debug Sync Facility 2009-09-29 17:38:40 +02:00
contributors.h
custom_conf.h
debug_sync.cc Fixed a valgrind error in debug_sync 2009-10-04 12:53:02 +03:00
debug_sync.h WL#4259 - Debug Sync Facility 2009-09-29 17:38:40 +02:00
derror.cc
des_key_file.cc
discover.cc
event_data_objects.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
event_data_objects.h
event_db_repository.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
event_db_repository.h
event_parse_data.cc Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
event_parse_data.h Added "Sun Microsystems, Inc." to copyright headers on files modified 2008-11-10 21:21:49 +01:00
event_queue.cc
event_queue.h
event_scheduler.cc Bug#43587: Putting event_scheduler=1 in init SQL file crashes 2009-07-24 15:45:42 -03:00
event_scheduler.h
events.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
events.h
field.cc manual merge of Bug#43508 2009-10-09 23:57:43 +02:00
field.h manual merge of Bug#43508 2009-10-09 23:57:43 +02:00
field_conv.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-06-17 15:54:01 +02:00
filesort.cc Bug #41543: Assertion `m_status == DA_ERROR' failed in Diagnostics_area::sql_errno 2009-01-09 14:04:47 +02:00
frm_crypt.cc
gen_lex_hash.cc Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
gstream.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-06-09 18:11:21 +02:00
gstream.h
ha_ndbcluster.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
ha_ndbcluster.h
ha_ndbcluster_binlog.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
ha_ndbcluster_binlog.h
ha_ndbcluster_cond.cc
ha_ndbcluster_cond.h
ha_ndbcluster_tables.h
ha_partition.cc merge into mysql-5.1-bugteam 2009-10-09 09:56:07 +02:00
ha_partition.h Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
handler.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
handler.h Bug#46944 Internal prepared XA transction XIDs are not 2009-10-12 14:46:00 +02:00
hash_filo.cc
hash_filo.h
hostname.cc
init.cc
item.cc Fix for bug#47963: Wrong results when index is used 2009-10-13 09:43:27 +05:00
item.h Manual merge between bug#46362 and bug#20577. 2009-08-28 12:55:59 +02:00
item_buff.cc
item_cmpfunc.cc Bug #44139: Table scan when NULL appears in IN clause 2009-10-05 10:27:36 +05:00
item_cmpfunc.h rollback of bug #40761 fix 2008-12-12 15:13:11 +04:00
item_create.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
item_create.h
item_func.cc merged compilation warning fixes 2009-09-24 16:28:13 +03:00
item_func.h Bug#45261: Crash, stored procedure + decimal 2009-08-24 16:47:08 -03:00
item_geofunc.cc automerge 2009-10-24 09:57:31 +03:00
item_geofunc.h
item_row.cc
item_row.h
item_strfunc.cc 5.0-bugteam->5.1-bugteam merge 2009-09-10 15:30:03 +05:00
item_strfunc.h Manual merge. 2009-06-01 16:00:38 +04:00
item_subselect.cc Fix for bug#46629: Item_in_subselect::val_int(): Assertion `0' 2009-09-04 13:14:54 +05:00
item_subselect.h
item_sum.cc Bug#45261: Crash, stored procedure + decimal 2009-08-24 16:47:08 -03:00
item_sum.h backported the fix for bug #34773 to 5.0 2008-12-09 20:35:02 +02:00
item_timefunc.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
item_timefunc.h Auto-merge up from 5.0 2009-02-07 16:50:31 +01:00
item_xmlfunc.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
item_xmlfunc.h
key.cc Bug#37721: ORDER BY when WHERE contains non-partitioned 2008-10-10 12:01:01 +02:00
lex.h Bug#45829 "CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing": 2009-07-29 10:54:20 +02:00
lex_symbol.h
lock.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
log.cc BUG#34582: mysql-5.1-bugteam-bug-branch --> mysql-5.1-bugteam-latest 2009-10-23 01:03:41 +01:00
log.h BUG#43929 binlog corruption when max_binlog_cache_size is exceeded 2009-06-18 14:52:46 +01:00
log_event.cc Bug#46640: output from mysqlbinlog command in 5.1 breaks replication 2009-10-23 11:13:42 +08:00
log_event.h Bug#43746: YACC return wrong query string when parse 'load data infile' sql statement 2009-09-28 05:41:10 -07:00
log_event_old.cc Bug#46640: output from mysqlbinlog command in 5.1 breaks replication 2009-10-23 11:13:42 +08:00
log_event_old.h
Makefile.am WL#4259 - Debug Sync Facility 2009-09-29 17:38:40 +02:00
message.h Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows. 2008-10-23 15:28:53 +02:00
message.mc Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows. 2008-10-23 15:28:53 +02:00
message.rc Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows. 2008-10-23 15:28:53 +02:00
mf_iocache.cc
MSG00001.bin Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows. 2008-10-23 15:28:53 +02:00
my_decimal.cc auto-merge 2008-11-27 12:33:04 +01:00
my_decimal.h Bug#45261: Crash, stored procedure + decimal 2009-08-24 16:47:08 -03:00
my_lock.c
mysql_priv.h Addendum to the fix for bug 43029 2009-10-08 16:21:07 +03:00
mysql_priv.h.pp Bug#47857 strip_sp function in mysys/mf_strip.c never used and cause name clash 2009-10-06 13:04:51 +02:00
mysqld.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
mysqld_suffix.h
net_serv.cc Manual merge. 2009-07-28 22:44:28 +04:00
nt_servc.cc merge 2008-11-22 01:10:38 +01:00
nt_servc.h merge 2008-11-22 01:10:38 +01:00
opt_range.cc Auto-merge. 2009-10-23 23:37:57 +05:00
opt_range.h Merge BUG#36639 into 5.1 2008-08-25 21:18:22 +04:00
opt_sum.cc Bug#47280 - strange results from count(*) with order by multiple 2009-10-14 10:46:50 +02:00
parse_file.cc Bug#44834 strxnmov is expected to behave as you'd expect 2009-06-19 13:24:43 +05:00
parse_file.h Bug#43385 Cannot ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME when Views exist(addon) 2009-04-13 18:09:10 +05:00
partition_element.h
partition_info.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
partition_info.h fixed a valgrind warning in partition_pruning 2009-09-02 18:42:08 +03:00
password.c Manual merge. 2009-06-01 16:00:38 +04:00
procedure.cc
procedure.h
protocol.cc Bug#44521 Executing a stored procedure as a prepared statement can sometimes cause 2009-07-29 22:07:08 +02:00
protocol.h Bug#44521 Executing a stored procedure as a prepared statement can sometimes cause 2009-07-29 22:07:08 +02:00
records.cc manual merge of 28141 2009-10-20 11:00:07 -07:00
repl_failsafe.cc A patch for Bug#47474 (mysqld hits Dbug_violation_helper assert 2009-09-23 17:10:23 +04:00
repl_failsafe.h
rpl_constants.h BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event 2008-12-29 17:04:10 +01:00
rpl_filter.cc A patch for Bug#45118 (mysqld.exe crashed in debug mode 2009-09-10 11:40:57 +04:00
rpl_filter.h
rpl_injector.cc
rpl_injector.h
rpl_mi.cc
rpl_mi.h
rpl_record.cc BUG#39753: Replication failure on MIXED + bit + myisam + no PK 2009-03-05 20:54:53 +01:00
rpl_record.h
rpl_record_old.cc
rpl_record_old.h
rpl_reporting.cc BUG#45511 rpl.rpl_binlog_corruption fails with warning messages in Valgrind 2009-06-16 16:04:30 +01:00
rpl_reporting.h BUG#45511 rpl.rpl_binlog_corruption fails with warning messages in Valgrind 2009-06-16 16:04:30 +01:00
rpl_rli.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
rpl_rli.h BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode 2009-02-21 09:36:07 +00:00
rpl_tblmap.cc Bug#31455 mysqlbinlog don't print user readable info about RBR events 2008-08-20 19:06:31 +05:00
rpl_tblmap.h Bug#31455 mysqlbinlog don't print user readable info about RBR events 2008-08-20 19:06:31 +05:00
rpl_utility.cc
rpl_utility.h Bug#42977 RBR logs for rows with more than 250 column results in corrupt binlog 2009-03-25 12:53:56 +02:00
scheduler.cc
scheduler.h
set_var.cc WL#4259 - Debug Sync Facility 2009-09-29 17:38:40 +02:00
set_var.h WL#4259 - Debug Sync Facility 2009-09-29 17:38:40 +02:00
slave.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
slave.h Bug#46640: output from mysqlbinlog command in 5.1 breaks replication 2009-10-14 09:39:05 +08:00
sp.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sp.h BUG#41166 stored function requires "deterministic" if binlog_format is "statement" 2009-07-28 18:44:38 +01:00
sp_cache.cc A fix for 2008-07-03 23:41:22 +04:00
sp_cache.h A fix for 2008-07-03 23:41:22 +04:00
sp_head.cc Bug #47412: Valgrind warnings / user can read uninitalized memory using 2009-10-26 11:55:57 +02:00
sp_head.h merging 2009-04-29 07:59:10 +05:00
sp_pcontext.cc merging 2009-04-29 07:59:10 +05:00
sp_pcontext.h merging 2009-04-29 07:59:10 +05:00
sp_rcontext.cc
sp_rcontext.h
spatial.cc Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
spatial.h Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
sql_acl.cc 5.0-bugteam->5.1-bugteam merge 2009-10-27 14:09:36 +04:00
sql_acl.h Bug#44658 Create procedure makes server crash when user does not have ALL privilege 2009-05-29 15:37:54 +02:00
sql_analyse.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
sql_analyse.h
sql_array.h
sql_base.cc Bug #43029: FORCE INDEX FOR ORDER BY is ignored when join 2009-10-07 18:03:42 +03:00
sql_binlog.cc Bug#46640: output from mysqlbinlog command in 5.1 breaks replication 2009-10-14 09:39:05 +08:00
sql_bitmap.h
sql_builtin.cc.in
sql_cache.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_cache.h Bug#43758 Query cache can lock up threads in 'freeing items' state 2009-06-16 10:34:47 +02:00
sql_class.cc A patch and a test case for 2009-10-28 17:49:56 +03:00
sql_class.h manual merge of 28141 2009-10-20 11:00:07 -07:00
sql_client.cc
sql_connect.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
sql_crypt.cc Bug#44358 valgrind errors with decode() function 2009-04-23 12:43:42 +05:00
sql_crypt.h Bug#44358 valgrind errors with decode() function 2009-04-23 12:43:42 +05:00
sql_cursor.cc 5.0-bugteam->5.1-bugteam merge 2008-12-10 18:16:21 +04:00
sql_cursor.h
sql_db.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_delete.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_derived.cc merged 5.0-bugteam to 5.1-bugteam 2009-05-27 18:19:44 +03:00
sql_do.cc
sql_error.cc Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
sql_error.h
sql_handler.cc Merge from 5.0 2009-09-17 17:25:52 +02:00
sql_help.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
sql_insert.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_lex.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-17 17:10:30 +02:00
sql_lex.h Bug#43746: YACC return wrong query string when parse 'load data infile' sql statement 2009-09-28 05:41:10 -07:00
sql_list.cc
sql_list.h Backport WL#3653 to 5.1 to enable bundled innodb plugin. 2009-06-10 10:59:49 +02:00
sql_load.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_locale.cc Bug#43207 wrong LC_TIME names for romanian locale 2009-10-19 13:41:52 +05:00
sql_manager.cc Bug#38522: 5 seconds delay when closing application using embedded server 2008-12-04 19:41:53 +01:00
sql_map.cc
sql_map.h
sql_olap.cc
sql_parse.cc merge 2009-10-16 16:11:21 +03:00
sql_partition.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_partition.h
sql_plugin.cc Bug#46586: When using the plugin interface the type "set" for options caused a crash. 2009-10-27 06:16:02 -07:00
sql_plugin.h Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors 2009-05-14 14:03:33 +02:00
sql_prepare.cc Bug #47788: Crash in TABLE_LIST::hide_view_error on 2009-10-19 16:55:04 +03:00
sql_profile.cc Bug #45287: phase 2 : 5.0 64 bit compilation warnings 2009-07-16 15:37:38 +03:00
sql_profile.h Backport WL#3653 to 5.1 to enable bundled innodb plugin. 2009-06-10 10:59:49 +02:00
sql_rename.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_repl.cc Bug #42914 Log event that larger than max_allowed_packet results in stop of slave I/O thread, 2009-09-18 16:20:29 +08:00
sql_repl.h
sql_select.cc Autopush 2009-10-22 14:40:15 +05:00
sql_select.h Bug#47280 - strange results from count(*) with order by multiple 2009-10-14 10:46:50 +02:00
sql_servers.cc fixed compilation warnings. addendum to the fix for bug 29125 2009-03-20 16:27:53 +02:00
sql_servers.h
sql_show.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_show.h Added "Sun Microsystems, Inc." to copyright headers on files modified 2008-11-10 21:21:49 +01:00
sql_sort.h
sql_state.c
sql_string.cc Bug# 30946: mysqldump silently ignores --default-character-set 2009-07-31 22:14:52 +05:00
sql_string.h Bug# 30946: mysqldump silently ignores --default-character-set 2009-07-31 22:14:52 +05:00
sql_table.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_tablespace.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_test.cc Bug#44164: TL_WRITE has no description in lock_descriptions[] 2009-04-14 14:05:32 +02:00
sql_trigger.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_trigger.h Fix for 2009-01-14 18:50:51 +04:00
sql_udf.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_udf.h
sql_union.cc 5.0-bugteam->5.1-bugteam merge 2009-05-15 12:11:07 +05:00
sql_update.cc automerge 2009-10-23 16:35:06 +02:00
sql_view.cc Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
sql_view.h Bug#43385 Cannot ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME when Views exist(addon) 2009-04-13 18:09:10 +05:00
sql_yacc.yy Revert the fix for bug #47627 as it's causing the regression tests in pb2 to 2009-10-23 16:54:58 +03:00
strfunc.cc Bug #43414 Parenthesis (and other) warnings compiling MySQL 2009-09-23 15:21:29 +02:00
structs.h Bug#45266: Uninitialized variable lead to an empty result. 2009-06-26 19:57:42 +00:00
table.cc Bug #43029: FORCE INDEX FOR ORDER BY is ignored when join 2009-10-07 18:03:42 +03:00
table.h Bug #43029: FORCE INDEX FOR ORDER BY is ignored when join 2009-10-07 18:03:42 +03:00
thr_malloc.cc Merge from 5.0 2009-06-29 16:00:47 +02:00
time.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
tzfile.h
tztime.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
tztime.h Backport of a 5.0.74 fix into 5.0.72sp1: 2009-01-12 17:40:29 +01:00
udf_example.c Merge from 5.0 2009-09-17 17:25:52 +02:00
udf_example.def
uniques.cc Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
unireg.cc BUG#46483 - drop table of partitioned table may leave 2009-09-02 16:19:28 +05:00
unireg.h Auto-merge 2009-07-31 15:28:15 -04:00