mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Misc. portability compile fixes.
sql/log_event.cc: Fix Windows compile errors. storage/innobase/btr/btr0sea.c: Fix AIX compile error (declarations must come before code in traditional C). sql/sql_class.h: Fix HPUX compile problem (HP compiler bug). Local class of member in derived class has no access to protected members, so make the class global and a friend. sql/sql_insert.cc: Fix HPUX compile problem (HP compiler bug). Local class of member in derived class has no access to protected members, so make the class global and a friend.
This commit is contained in:
@ -2498,25 +2498,28 @@ 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 {
|
||||
public:
|
||||
select_create_prepare_hooks(select_create *x) : ptr(x) { }
|
||||
virtual void do_prelock(TABLE **tables, uint count)
|
||||
{
|
||||
if (ptr->thd->current_stmt_binlog_row_based)
|
||||
ptr->binlog_show_create_table(tables, count);
|
||||
}
|
||||
|
||||
private:
|
||||
select_create *ptr;
|
||||
};
|
||||
|
||||
int
|
||||
select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
{
|
||||
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->thd->current_stmt_binlog_row_based)
|
||||
ptr->binlog_show_create_table(tables, count);
|
||||
}
|
||||
|
||||
private:
|
||||
select_create *ptr;
|
||||
};
|
||||
|
||||
MY_HOOKS hooks(this);
|
||||
select_create_prepare_hooks hooks(this);
|
||||
|
||||
unit= u;
|
||||
table= create_table_from_items(thd, create_info, create_table,
|
||||
|
Reference in New Issue
Block a user