mariadb/sql
Igor Babaev c7a153453e Fixed the bug mdev-12556.
When the rows produced on the current iteration are sent to the
temporary table T of the UNION type created for CTE the rows
that were not there simultaneously are sent to the temporary
table D that contains rows for the next iteration. The test
whether a row was in T checks the return code of writing into T.
If just a HEAP table is used for T then the return code is
HA_ERR_FOUND_DUPP_KEY, but if an ARIA table is used for T then
the return code is HA_ERR_FOUND_DUPP_UNIQUE.
The implementation of select_union_recursive::send_data()
erroneously checked only for the first return code. So if an Aria
table was used for T then all rows produced by the current iteration
went to D and and in most cases D grew with each iteration.
Whether T has reached stabilization is detected by
checking whether D is empty. So as a result, the iterations were
never stopped unless a limit for them was set.

Fixed by checking for both HA_ERR_FOUND_DUPP_KEY and
HA_ERR_FOUND_DUPP_UNIQUE as return codes returned by
the function writing a row into the temporary table T.
2017-04-26 10:16:03 -07:00
..
share MDEV-12017 Unclear error with flashback: Variable 'binlog_format' can't ... 2017-04-26 11:08:23 +05:30
add_errmsg
authors.h
bounded_queue.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
client_settings.h
CMakeLists.txt Merge 10.1 into 10.2 2017-04-06 09:52:25 +03:00
compat56.cc
compat56.h
contributors.h
create_options.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
create_options.h
custom_conf.h
datadict.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
datadict.h
debug_sync.cc
debug_sync.h
derror.cc
derror.h
des_key_file.cc
des_key_file.h
discover.cc
discover.h
encryption.cc
event_data_objects.cc
event_data_objects.h
event_db_repository.cc
event_db_repository.h
event_parse_data.cc
event_parse_data.h
event_queue.cc
event_queue.h
event_scheduler.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
event_scheduler.h
events.cc
events.h
field.cc
field.h MDEV-11117 CHECK constraint fails on intermediate step of ALTER 2017-04-17 15:32:44 -07:00
field_conv.cc
filesort.cc
filesort.h
filesort_utils.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
filesort_utils.h
gcalc_slicescan.cc
gcalc_slicescan.h
gcalc_tools.cc
gcalc_tools.h
gen_lex_hash.cc
gen_lex_token.cc
group_by_handler.cc
group_by_handler.h
gstream.cc
gstream.h
ha_partition.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
ha_partition.h
handler.cc ha_start_consistent_snapshot() did not check for errors 2017-03-31 19:28:58 +02:00
handler.h move rocksdb specific changes into rocksdb 2017-03-31 19:28:57 +02:00
hash_filo.cc
hash_filo.h
hostname.cc
hostname.h
init.cc
init.h
innodb_priv.h
item.cc MDEV-10355 Weird error message upon CREATE TABLE with DEFAULT 2017-04-18 17:36:05 -07:00
item.h MDEV-10355 Weird error message upon CREATE TABLE with DEFAULT 2017-04-18 17:36:05 -07:00
item_buff.cc
item_cmpfunc.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
item_cmpfunc.h Fixed bug mdev-10454. 2017-04-03 15:59:38 -07:00
item_create.cc
item_create.h
item_func.cc Fixed the bug mdev-12373. 2017-04-24 23:58:23 -07:00
item_func.h
item_geofunc.cc
item_geofunc.h
item_inetfunc.cc
item_inetfunc.h
item_jsonfunc.cc
item_jsonfunc.h
item_row.cc
item_row.h Fixed bug mdev-10454. 2017-04-03 15:59:38 -07:00
item_strfunc.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
item_strfunc.h
item_subselect.cc Fixed the bug mdev-12564. 2017-04-24 14:57:26 -07:00
item_subselect.h Fixed the bug mdev-12519. 2017-04-21 09:33:36 -07:00
item_sum.cc
item_sum.h
item_timefunc.cc
item_timefunc.h
item_windowfunc.cc
item_windowfunc.h
item_xmlfunc.cc
item_xmlfunc.h
key.cc
key.h
keycaches.cc
keycaches.h
lex.h
lex_symbol.h
lock.cc
lock.h
log.cc cleanup: unused method LOGGER::flush_logs 2017-04-07 09:55:54 +02:00
log.h cleanup: unused method LOGGER::flush_logs 2017-04-07 09:55:54 +02:00
log_event.cc ASAN error in rpl.mysql-wsrep#110-2 2017-04-07 09:55:54 +02:00
log_event.h ASAN errors in many rpl tests 2017-04-07 09:55:54 +02:00
log_event_old.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
log_event_old.h
log_slow.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
main.cc
mdl.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
mdl.h
mem_root_array.h
message.h
message.mc
message.rc
mf_iocache.cc
mf_iocache_encr.cc
MSG00001.bin
multi_range_read.cc
multi_range_read.h
my_apc.cc
my_apc.h
my_decimal.cc
my_decimal.h
my_json_writer.cc
my_json_writer.h
mysql_install_db.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
mysql_upgrade_service.cc
mysqld.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
mysqld.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
mysqld_suffix.h
net_serv.cc
nt_servc.cc
nt_servc.h
opt_index_cond_pushdown.cc
opt_range.cc Fixed bug mdev-10454. 2017-04-03 15:59:38 -07:00
opt_range.h
opt_range_mrr.cc
opt_subselect.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
opt_subselect.h
opt_sum.cc
opt_table_elimination.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
parse_file.cc
parse_file.h
partition_element.h
partition_info.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
partition_info.h
password.c Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
plistsort.c
procedure.cc
procedure.h
protocol.cc
protocol.h
records.cc
records.h
repl_failsafe.cc
repl_failsafe.h
replication.h
rpl_constants.h
rpl_filter.cc
rpl_filter.h
rpl_gtid.cc
rpl_gtid.h
rpl_handler.cc
rpl_handler.h
rpl_injector.cc
rpl_injector.h
rpl_mi.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
rpl_mi.h
rpl_parallel.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
rpl_parallel.h
rpl_record.cc
rpl_record.h
rpl_record_old.cc
rpl_record_old.h
rpl_reporting.cc
rpl_reporting.h
rpl_rli.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
rpl_rli.h ASAN error in rpl.mysql-wsrep#110-2 2017-04-07 09:55:54 +02:00
rpl_tblmap.cc
rpl_tblmap.h
rpl_utility.cc
rpl_utility.h
scheduler.cc
scheduler.h
session_tracker.cc
session_tracker.h
set_var.cc
set_var.h
signal_handler.cc
slave.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
slave.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sp.cc
sp.h
sp_cache.cc
sp_cache.h
sp_head.cc
sp_head.h
sp_pcontext.cc
sp_pcontext.h
sp_rcontext.cc
sp_rcontext.h
spatial.cc
spatial.h
sql_acl.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_acl.h
sql_admin.cc
sql_admin.h
sql_alter.cc
sql_alter.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_analyse.cc
sql_analyse.h
sql_analyze_stmt.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_analyze_stmt.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_array.h
sql_audit.cc
sql_audit.h
sql_base.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_base.h
sql_basic_types.h
sql_binlog.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_binlog.h
sql_bitmap.h
sql_bootstrap.cc
sql_bootstrap.h
sql_builtin.cc.in
sql_cache.cc
sql_cache.h
sql_callback.h
sql_class.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_class.h
sql_client.cc
sql_cmd.h
sql_connect.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_connect.h
sql_const.h
sql_crypt.cc
sql_crypt.h
sql_cte.cc Fixed the bug mdev-12558. 2017-04-25 19:34:39 -07:00
sql_cte.h Fixed the bug mdev-12519. 2017-04-21 09:33:36 -07:00
sql_cursor.cc
sql_cursor.h
sql_db.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_db.h
sql_delete.cc
sql_delete.h
sql_derived.cc Fixed the bug mdev-12373. 2017-04-24 23:58:23 -07:00
sql_derived.h
sql_digest.cc
sql_digest.h
sql_digest_stream.h
sql_do.cc
sql_do.h
sql_error.cc
sql_error.h
sql_explain.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_explain.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_expression_cache.cc
sql_expression_cache.h
sql_get_diagnostics.cc
sql_get_diagnostics.h
sql_handler.cc
sql_handler.h
sql_help.cc
sql_help.h
sql_hset.h remove my_hash_const_element(), use Hash_set in C++ code 2017-03-31 19:22:19 +02:00
sql_insert.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_insert.h
sql_join_cache.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_join_cache.h
sql_lex.cc
sql_lex.h
sql_lifo_buffer.h
sql_list.cc
sql_list.h
sql_load.cc
sql_load.h
sql_locale.cc
sql_locale.h
sql_manager.cc
sql_manager.h
sql_parse.cc ha_start_consistent_snapshot() did not check for errors 2017-03-31 19:28:58 +02:00
sql_parse.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_partition.cc MDEV-12395: DROP PARTITION does not work as expected when table has DEFAULT LIST partition 2017-04-07 18:26:55 +02:00
sql_partition.h
sql_partition_admin.cc
sql_partition_admin.h
sql_plist.h
sql_plugin.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_plugin.h
sql_plugin_compat.h
sql_plugin_services.ic Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_prepare.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_prepare.h
sql_priv.h
sql_profile.cc
sql_profile.h
sql_reload.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_reload.h
sql_rename.cc
sql_rename.h
sql_repl.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_repl.h
sql_select.cc Fixed the bug mdev-12519. 2017-04-21 09:33:36 -07:00
sql_select.h MDEV-12416 OOM in create_virtual_tmp_table() makes the server crash 2017-03-31 15:18:28 +04:00
sql_servers.cc
sql_servers.h
sql_show.cc Merge 10.2 into bb-10.2-mariarocks 2017-04-03 13:48:05 +03:00
sql_show.h
sql_signal.cc
sql_signal.h
sql_sort.h
sql_state.c
sql_statistics.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_statistics.h
sql_string.cc
sql_string.h
sql_table.cc MDEV-11995 ALTER TABLE proceeds despite reporting ER_TOO_LONG_KEY error 2017-04-07 09:55:54 +02:00
sql_table.h
sql_tablespace.cc
sql_tablespace.h
sql_test.cc
sql_test.h
sql_time.cc
sql_time.h
sql_trigger.cc
sql_trigger.h
sql_truncate.cc
sql_truncate.h
sql_type.cc
sql_type.h
sql_udf.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
sql_udf.h
sql_union.cc Fixed the bug mdev-12556. 2017-04-26 10:16:03 -07:00
sql_union.h
sql_update.cc
sql_update.h
sql_view.cc
sql_view.h
sql_window.cc
sql_window.h
sql_yacc.yy MDEV-12421 Check constraint with query crashes server and renders DB unusable 2017-04-01 18:59:29 +02:00
strfunc.cc
strfunc.h
structs.h
sys_vars.cc MDEV-12017 Unclear error with flashback: Variable 'binlog_format' can't ... 2017-04-26 11:08:23 +05:30
sys_vars.ic
sys_vars_shared.h
table.cc MDEV-10355 Weird error message upon CREATE TABLE with DEFAULT 2017-04-18 17:36:05 -07:00
table.h Fixed the bug mdev-12373. 2017-04-24 23:58:23 -07:00
table_cache.cc
table_cache.h
temporary_tables.cc
thr_malloc.cc
thr_malloc.h
threadpool.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
threadpool_common.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
threadpool_generic.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
threadpool_win.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
transaction.cc
transaction.h
tzfile.h
tztime.cc
tztime.h
udf_example.c
udf_example.def
uniques.cc
uniques.h
unireg.cc
unireg.h
winservice.c
winservice.h
wsrep_applier.cc
wsrep_applier.h
wsrep_binlog.cc Merge 10.1 into 10.2 2017-04-06 09:52:25 +03:00
wsrep_binlog.h
wsrep_check_opts.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_dummy.cc
wsrep_hton.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_mysqld.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_mysqld.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_notify.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_priv.h Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_sst.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_sst.h
wsrep_thd.cc
wsrep_thd.h
wsrep_utils.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_utils.h
wsrep_var.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_var.h
wsrep_xid.cc Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
wsrep_xid.h