mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#20018 Class declared inside of function causes problem with gcc 2.95.3
- Move class MY_HOOKS out of function sql/sql_insert.cc: Move class MY_HOOKS out of function 'select_create::prepare'
This commit is contained in:
@ -2674,24 +2674,24 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class MY_HOOKS : public TABLEOP_HOOKS {
|
||||||
|
public:
|
||||||
|
MY_HOOKS(select_create *x) : ptr(x) { }
|
||||||
|
virtual void do_prelock(TABLE **tables, uint count)
|
||||||
|
{
|
||||||
|
if (ptr->get_thd()->current_stmt_binlog_row_based)
|
||||||
|
ptr->binlog_show_create_table(tables, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
select_create *ptr;
|
||||||
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("select_create::prepare");
|
DBUG_ENTER("select_create::prepare");
|
||||||
|
|
||||||
class MY_HOOKS : public TABLEOP_HOOKS {
|
|
||||||
public:
|
|
||||||
MY_HOOKS(select_create *x) : ptr(x) { }
|
|
||||||
virtual void do_prelock(TABLE **tables, uint count)
|
|
||||||
{
|
|
||||||
if (ptr->get_thd()->current_stmt_binlog_row_based)
|
|
||||||
ptr->binlog_show_create_table(tables, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
select_create *ptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
MY_HOOKS hooks(this);
|
MY_HOOKS hooks(this);
|
||||||
|
|
||||||
unit= u;
|
unit= u;
|
||||||
|
Reference in New Issue
Block a user