Loading sql/sql_class.h +2 −1 Original line number Diff line number Diff line Loading @@ -1605,13 +1605,14 @@ class select_create: public select_insert { lock(0) {} int prepare(List<Item> &list, SELECT_LEX_UNIT *u); friend class select_create_prepare_hooks; void binlog_show_create_table(TABLE **tables, uint count); void store_values(List<Item> &values); void send_error(uint errcode,const char *err); bool send_eof(); void abort(); // Needed for access from local class MY_HOOKS in prepare(), since thd is proteted. THD *get_thd(void) { return thd; } }; #include <myisam.h> Loading sql/sql_insert.cc +14 −17 Original line number Diff line number Diff line Loading @@ -2498,15 +2498,17 @@ bool select_insert::send_eof() CREATE TABLE (SELECT) ... ***************************************************************************/ /* HPUX compiler bug prevents this from being a local class, since then it does not have access to protected member select_create::thd. */ class select_create_prepare_hooks : public TABLEOP_HOOKS { int select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) { DBUG_ENTER("select_create::prepare"); class MY_HOOKS : public TABLEOP_HOOKS { public: select_create_prepare_hooks(select_create *x) : ptr(x) { } MY_HOOKS(select_create *x) : ptr(x) { } virtual void do_prelock(TABLE **tables, uint count) { if (ptr->thd->current_stmt_binlog_row_based) if (ptr->get_thd()->current_stmt_binlog_row_based) ptr->binlog_show_create_table(tables, count); } Loading @@ -2514,12 +2516,7 @@ class select_create_prepare_hooks : public TABLEOP_HOOKS { select_create *ptr; }; int select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) { DBUG_ENTER("select_create::prepare"); select_create_prepare_hooks hooks(this); MY_HOOKS hooks(this); unit= u; table= create_table_from_items(thd, create_info, create_table, Loading Loading
sql/sql_class.h +2 −1 Original line number Diff line number Diff line Loading @@ -1605,13 +1605,14 @@ class select_create: public select_insert { lock(0) {} int prepare(List<Item> &list, SELECT_LEX_UNIT *u); friend class select_create_prepare_hooks; void binlog_show_create_table(TABLE **tables, uint count); void store_values(List<Item> &values); void send_error(uint errcode,const char *err); bool send_eof(); void abort(); // Needed for access from local class MY_HOOKS in prepare(), since thd is proteted. THD *get_thd(void) { return thd; } }; #include <myisam.h> Loading
sql/sql_insert.cc +14 −17 Original line number Diff line number Diff line Loading @@ -2498,15 +2498,17 @@ bool select_insert::send_eof() CREATE TABLE (SELECT) ... ***************************************************************************/ /* HPUX compiler bug prevents this from being a local class, since then it does not have access to protected member select_create::thd. */ class select_create_prepare_hooks : public TABLEOP_HOOKS { int select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) { DBUG_ENTER("select_create::prepare"); class MY_HOOKS : public TABLEOP_HOOKS { public: select_create_prepare_hooks(select_create *x) : ptr(x) { } MY_HOOKS(select_create *x) : ptr(x) { } virtual void do_prelock(TABLE **tables, uint count) { if (ptr->thd->current_stmt_binlog_row_based) if (ptr->get_thd()->current_stmt_binlog_row_based) ptr->binlog_show_create_table(tables, count); } Loading @@ -2514,12 +2516,7 @@ class select_create_prepare_hooks : public TABLEOP_HOOKS { select_create *ptr; }; int select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) { DBUG_ENTER("select_create::prepare"); select_create_prepare_hooks hooks(this); MY_HOOKS hooks(this); unit= u; table= create_table_from_items(thd, create_info, create_table, Loading