mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
manually merged
client/mysqlbinlog.cc: Auto merged configure.in: Auto merged include/my_global.h: Auto merged include/my_pthread.h: Auto merged innobase/trx/trx0trx.c: Auto merged mysql-test/include/varchar.inc: Auto merged mysql-test/r/bdb.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/r/mysqlbinlog2.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/user_var.test: Auto merged mysys/hash.c: Auto merged sql/item_func.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/set_var.h: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_repl.cc: Auto merged sql/sql_repl.h: Auto merged sql/sql_table.cc: Auto merged sql/sql_trigger.cc: Auto merged mysql-test/r/ctype_ucs.result: ul mysql-test/r/drop_temp_table.result: ul mysql-test/r/innodb.result: ul mysql-test/r/insert_select.result: ul mysql-test/r/mix_innodb_myisam_binlog.result: ul mysql-test/r/rpl_change_master.result: ul mysql-test/r/rpl_charset.result: ul mysql-test/r/rpl_error_ignored_table.result: ul mysql-test/r/rpl_flush_log_loop.result: ul mysql-test/r/rpl_flush_tables.result: ul mysql-test/r/rpl_loaddata.result: ul mysql-test/r/rpl_loaddata_rule_m.result: ul mysql-test/r/rpl_log.result: ul mysql-test/r/rpl_max_relay_size.result: ul mysql-test/r/rpl_relayrotate.result: ul mysql-test/r/rpl_replicate_do.result: ul mysql-test/r/rpl_rotate_logs.result: ul mysql-test/r/rpl_temporary.result: ul mysql-test/r/rpl_timezone.result: ul mysql-test/r/rpl_until.result: ul mysql-test/r/rpl_user_variables.result: ul mysql-test/r/user_var.result: ul
This commit is contained in:
@ -384,8 +384,8 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived,
|
||||
{
|
||||
TABLE *table, *next;
|
||||
/*
|
||||
Close all derived tables generated from questions like
|
||||
SELECT * from (select * from t1))
|
||||
Close all derived tables generated in queries like
|
||||
SELECT * FROM (SELECT * FROM t1)
|
||||
*/
|
||||
for (table= thd->derived_tables ; table ; table= next)
|
||||
{
|
||||
@ -405,6 +405,18 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived,
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
thd->lock=0;
|
||||
}
|
||||
/*
|
||||
assume handlers auto-commit (if some doesn't - transaction handling
|
||||
in MySQL should be redesigned to support it; it's a big change,
|
||||
and it's not worth it - better to commit explicitly only writing
|
||||
transactions, read-only ones should better take care of themselves.
|
||||
saves some work in 2pc too)
|
||||
see also sql_parse.cc - dispatch_command()
|
||||
*/
|
||||
bzero(&thd->transaction.stmt, sizeof(thd->transaction.stmt));
|
||||
if (!thd->active_transaction())
|
||||
thd->transaction.xid.null();
|
||||
|
||||
/* VOID(pthread_sigmask(SIG_SETMASK,&thd->block_signals,NULL)); */
|
||||
if (!lock_in_use)
|
||||
VOID(pthread_mutex_lock(&LOCK_open));
|
||||
@ -1824,7 +1836,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
|
||||
-1 - error
|
||||
|
||||
NOTE
|
||||
The lock will automaticly be freed by close_thread_tables()
|
||||
The lock will automaticaly be freed by close_thread_tables()
|
||||
*/
|
||||
|
||||
int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
|
||||
@ -1851,7 +1863,7 @@ int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
|
||||
TRUE - error
|
||||
|
||||
NOTE
|
||||
The lock will automaticly be freed by close_thread_tables()
|
||||
The lock will automaticaly be freed by close_thread_tables()
|
||||
*/
|
||||
|
||||
bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
|
||||
|
Reference in New Issue
Block a user