Bug#20018 Class declared inside of function causes problem with gcc 2.95.3

 - Move class MY_HOOKS out of function
parent 30be7555
...@@ -2674,13 +2674,8 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, ...@@ -2674,13 +2674,8 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
} }
int class MY_HOOKS : public TABLEOP_HOOKS {
select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) public:
{
DBUG_ENTER("select_create::prepare");
class MY_HOOKS : public TABLEOP_HOOKS {
public:
MY_HOOKS(select_create *x) : ptr(x) { } MY_HOOKS(select_create *x) : ptr(x) { }
virtual void do_prelock(TABLE **tables, uint count) virtual void do_prelock(TABLE **tables, uint count)
{ {
...@@ -2688,9 +2683,14 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) ...@@ -2688,9 +2683,14 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
ptr->binlog_show_create_table(tables, count); ptr->binlog_show_create_table(tables, count);
} }
private: private:
select_create *ptr; select_create *ptr;
}; };
int
select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
{
DBUG_ENTER("select_create::prepare");
MY_HOOKS hooks(this); MY_HOOKS hooks(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment