mariadb/sql
Mithun C Y dea2340866 Bug #20447262: REPEATED EXECUTION OF PREPARED STATEMENTS FAILS, IF DEFAULT DATABASE IS CHANGED.
Issue:
======
While re-preparing the statement in
Prepared_statement::swap_prepared_statement for swapping
the database of PS we only swapped the db string but not
its length. This resulted in mismatch between the actual
string and its length. In one particular case where db
of PS was dropped, we have db as null pointer and length
as non-zero. strdup which used above values resulted in
invalid memory access.

Solution:
=========
In Prepared_statement::swap_prepared_statement also swap
db_length along with db variable. Also, remove
DBUG_ASSERT(db_length == copy->db_length) as this have
no meaning if they are 2 different entities.
2015-10-22 17:02:12 +05:30
..
examples
share
add_errmsg
authors.h
client_settings.h
CMakeLists.txt
contributors.h
custom_conf.h
datadict.cc
datadict.h
db.opt
debug_sync.cc
debug_sync.h
derror.cc
derror.h
des_key_file.cc
des_key_file.h
discover.cc
discover.h
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
event_scheduler.h
events.cc
events.h
field.cc
field.h
field_conv.cc
filesort.cc
filesort.h
frm_crypt.cc
frm_crypt.h
gen_lex_hash.cc
gstream.cc
gstream.h
ha_ndbcluster.cc
ha_ndbcluster.h
ha_ndbcluster_binlog.cc
ha_ndbcluster_binlog.h
ha_ndbcluster_cond.cc
ha_ndbcluster_cond.h
ha_ndbcluster_tables.h
ha_partition.cc
ha_partition.h
handler.cc
handler.h
hash_filo.cc
hash_filo.h
hostname.cc
hostname.h
init.cc
init.h
item.cc
item.h
item_buff.cc
item_cmpfunc.cc Bug #19929406: HANDLE_FATAL_SIGNAL (SIG=11) IN 2015-09-18 07:34:32 +05:30
item_cmpfunc.h Bug #19929406: HANDLE_FATAL_SIGNAL (SIG=11) IN 2015-09-18 07:34:32 +05:30
item_create.cc
item_create.h
item_func.cc Bug #20007383: HANDLE_FATAL_SIGNAL (SIG=11) IN UPDATE_REF_AND_KEYS. 2015-10-12 12:56:36 +05:30
item_func.h
item_geofunc.cc
item_geofunc.h
item_row.cc
item_row.h
item_strfunc.cc
item_strfunc.h
item_subselect.cc Bug #19434916: FATAL_SIGNAL IN ADD_KEY_EQUAL_FIELDS() WITH 2015-10-01 07:45:27 +05:30
item_subselect.h
item_sum.cc
item_sum.h
item_timefunc.cc
item_timefunc.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
log.h
log_event.cc
log_event.h
log_event_old.cc
log_event_old.h
main.cc
mdl.cc
mdl.h
mem_root_array.h
message.h
message.mc
message.rc
mf_iocache.cc
MSG00001.bin
my_decimal.cc
my_decimal.h
mysqld.cc
mysqld.h Bug #21370329 : FLUSH DES_KEY_FILE MAY NOT WORK 2015-09-22 14:51:48 +05:30
mysqld_suffix.h
net_serv.cc
nt_servc.cc
nt_servc.h
opt_range.cc
opt_range.h
opt_sum.cc
parse_file.cc
parse_file.h
partition_element.h
partition_info.cc
partition_info.h
password.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_handler.cc
rpl_handler.h
rpl_injector.cc
rpl_injector.h
rpl_mi.cc
rpl_mi.h
rpl_record.cc
rpl_record.h
rpl_record_old.cc
rpl_record_old.h
rpl_reporting.cc
rpl_reporting.h
rpl_rli.cc
rpl_rli.h
rpl_tblmap.cc
rpl_tblmap.h
rpl_utility.cc
rpl_utility.h
scheduler.cc
scheduler.h
set_var.cc
set_var.h
sha2.cc
signal_handler.cc
slave.cc
slave.h
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 Bug #21602056 : CONCURRENT FLUSH PRIVILEGES + REVOKE/GRANT 2015-10-14 11:08:49 +05:30
sql_acl.h
sql_admin.cc
sql_admin.h
sql_alter.cc
sql_alter.h
sql_analyse.cc
sql_analyse.h
sql_array.h
sql_audit.cc
sql_audit.h
sql_base.cc
sql_base.h
sql_binlog.cc
sql_binlog.h
sql_bitmap.h
sql_builtin.cc.in
sql_cache.cc
sql_cache.h
sql_callback.h
sql_class.cc
sql_class.h
sql_client.cc
sql_connect.cc
sql_connect.h
sql_const.h
sql_crypt.cc
sql_crypt.h
sql_cursor.cc
sql_cursor.h
sql_db.cc
sql_db.h
sql_delete.cc
sql_delete.h
sql_derived.cc
sql_derived.h
sql_do.cc
sql_do.h
sql_error.cc
sql_error.h
sql_handler.cc
sql_handler.h
sql_help.cc
sql_help.h
sql_hset.h
sql_insert.cc Bug #19894161: FATAL SIGNAL 11 IN 2015-10-06 07:09:36 +05:30
sql_insert.h
sql_lex.cc
sql_lex.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
sql_parse.h
sql_partition.cc
sql_partition.h
sql_partition_admin.cc
sql_partition_admin.h
sql_plist.h
sql_plugin.cc
sql_plugin.h
sql_plugin_services.h
sql_prepare.cc Bug #20447262: REPEATED EXECUTION OF PREPARED STATEMENTS FAILS, IF DEFAULT DATABASE IS CHANGED. 2015-10-22 17:02:12 +05:30
sql_prepare.h
sql_priv.h
sql_profile.cc
sql_profile.h
sql_reload.cc Bug #21370329 : FLUSH DES_KEY_FILE MAY NOT WORK 2015-09-22 14:51:48 +05:30
sql_reload.h
sql_rename.cc
sql_rename.h
sql_repl.cc
sql_repl.h
sql_select.cc Bug #19434916: FATAL_SIGNAL IN ADD_KEY_EQUAL_FIELDS() WITH 2015-10-01 07:45:27 +05:30
sql_select.h
sql_servers.cc
sql_servers.h
sql_show.cc
sql_show.h
sql_signal.cc
sql_signal.h
sql_sort.h
sql_state.c
sql_string.cc
sql_string.h
sql_table.cc Bug#20755615 CREATING INDEX ON A RENAMED COLUMN WITH CASE CRASH .FRM 2015-09-22 16:52:18 +05:30
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_udf.cc
sql_udf.h
sql_union.cc
sql_union.h
sql_update.cc
sql_update.h
sql_view.cc
sql_view.h
sql_yacc.yy
strfunc.cc
strfunc.h
structs.h
sys_vars.cc
sys_vars.h
sys_vars_shared.h
table.cc Bug #19929406: HANDLE_FATAL_SIGNAL (SIG=11) IN 2015-09-18 07:34:32 +05:30
table.h
thr_malloc.cc
thr_malloc.h
transaction.cc
transaction.h
tzfile.h
tztime.cc
tztime.h
udf_example.c
udf_example.def
uniques.cc
unireg.cc
unireg.h