1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Backport of:

------------------------------------------------------------
revno: 2630.4.39
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w2
timestamp: Thu 2008-06-26 13:08:27 +0400
message:
  Fix warnings about passing pointer to not fully-initialized THD
  object to constructor of base Open_tables_state classe, which
  appeared on Windows and were introduced by one of the patches
  implementing WL#3726 "DDL locking for all metadata objects".
This commit is contained in:
Konstantin Osipov
2009-12-03 14:12:53 +03:00
parent ef15a335b3
commit 45a5d79713
2 changed files with 17 additions and 11 deletions

View File

@ -202,12 +202,6 @@ bool foreign_key_prefix(Key *a, Key *b)
** Thread specific functions
****************************************************************************/
Open_tables_state::Open_tables_state(THD *thd, ulong version_arg)
:version(version_arg), state_flags(0U)
{
reset_open_tables_state(thd);
}
/*
The following functions form part of the C plugin API
*/
@ -440,7 +434,7 @@ bool Drop_table_error_handler::handle_condition(THD *thd,
THD::THD()
:Statement(&main_lex, &main_mem_root, CONVENTIONAL_EXECUTION,
/* statement id */ 0),
Open_tables_state(this, refresh_version), rli_fake(0),
rli_fake(0),
lock_id(&main_lock_id),
user_time(0), in_sub_stmt(0),
sql_log_bin_toplevel(false),
@ -542,6 +536,9 @@ THD::THD()
command=COM_CONNECT;
*scramble= '\0';
/* Call to init() below requires fully initialized Open_tables_state. */
init_open_tables_state(this, refresh_version);
init();
#if defined(ENABLED_PROFILING)
profiling.set_thd(this);