diff options
author | Marc Alff <marc.alff@sun.com> | 2009-12-11 01:58:13 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2009-12-11 01:58:13 -0700 |
commit | bea4ab9bb65f6ff576b9b71011c5a8f22baa164a (patch) | |
tree | 5d91d6cc01f82639588f2c17fbb5289637567684 /sql/sql_view.cc | |
parent | c082955f0676efe069f30384102ba7807b49dee6 (diff) | |
parent | 376cf4275f28f6b8167eaf19b2c66dee41fbc5c5 (diff) | |
download | mariadb-git-bea4ab9bb65f6ff576b9b71011c5a8f22baa164a.tar.gz |
Merge mysql-next-mr (revno 2936) --> mysql-next-mr-marc
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 9d383dcd363..8d2d03583de 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -662,8 +662,9 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, buff.append(views->source.str, views->source.length); int errcode= query_error_code(thd, TRUE); - thd->binlog_query(THD::STMT_QUERY_TYPE, - buff.ptr(), buff.length(), FALSE, FALSE, errcode); + if (thd->binlog_query(THD::STMT_QUERY_TYPE, + buff.ptr(), buff.length(), FALSE, FALSE, errcode)) + res= TRUE; } mysql_mutex_unlock(&LOCK_open); @@ -818,7 +819,8 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, thd->variables.sql_mode|= sql_mode; } - DBUG_PRINT("info", ("View: %s", view_query.ptr())); + DBUG_PRINT("info", + ("View: %*.s", (int) view_query.length(), view_query.ptr())); /* fill structure */ view->source= thd->lex->create_view_select; @@ -1653,7 +1655,8 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode) /* if something goes wrong, bin-log with possible error code, otherwise bin-log with error code cleared. */ - write_bin_log(thd, !something_wrong, thd->query(), thd->query_length()); + if (write_bin_log(thd, !something_wrong, thd->query(), thd->query_length())) + something_wrong= 1; } mysql_mutex_unlock(&LOCK_open); |