summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
author <Li-Bing.Song@sun.com>2010-08-18 12:56:06 +0800
committer <Li-Bing.Song@sun.com>2010-08-18 12:56:06 +0800
commitb766a51f419eb5ff831e935f28c17a6a41cd5e58 (patch)
tree16b28895d7863e7a43e3bb20dc77422d067a6626 /sql/sql_class.h
parent12f7d57d42f426803a94877664063c2809e63cf9 (diff)
downloadmariadb-git-b766a51f419eb5ff831e935f28c17a6a41cd5e58.tar.gz
WL#5370 Keep forward-compatibility when changing
'CREATE TABLE IF NOT EXISTS ... SELECT' behaviour BUG#55474, BUG#55499, BUG#55598, BUG#55616 and BUG#55777 are fixed in this patch too. This is the 5.1 part. It implements: - if the table exists, binlog two events: CREATE TABLE IF NOT EXISTS and INSERT ... SELECT - Insert nothing and binlog nothing on master if the existing object is a view. It only generates a warning that table already exists.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 1627b6ec02d..42c873e9fc3 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -2622,7 +2622,9 @@ public:
class select_insert :public select_result_interceptor {
- public:
+protected:
+ virtual int write_to_binlog(bool is_trans, int errcode);
+public:
TABLE_LIST *table_list;
TABLE *table;
List<Item> *fields;
@@ -2658,6 +2660,8 @@ class select_create: public select_insert {
MYSQL_LOCK *m_lock;
/* m_lock or thd->extra_lock */
MYSQL_LOCK **m_plock;
+
+ virtual int write_to_binlog(bool is_trans, int errcode);
public:
select_create (TABLE_LIST *table_arg,
HA_CREATE_INFO *create_info_par,
@@ -2673,7 +2677,7 @@ public:
{}
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
- int binlog_show_create_table(TABLE **tables, uint count);
+ int binlog_show_create_table(TABLE **tables, uint count, int errcode);
void store_values(List<Item> &values);
void send_error(uint errcode,const char *err);
bool send_eof();