Commit 5a39b273 authored by cmiller@zippy.cornsilk.net's avatar cmiller@zippy.cornsilk.net

Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint-afterbreak

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
parents 6a679658 c2119709
...@@ -284,7 +284,7 @@ end: ...@@ -284,7 +284,7 @@ end:
thd->clear_error(); thd->clear_error();
/* Such a statement can always go directly to binlog, no trans cache. */ /* Such a statement can always go directly to binlog, no trans cache. */
thd->binlog_query(THD::MYSQL_QUERY_TYPE, thd->binlog_query(THD::MYSQL_STMT_TYPE,
stmt_query.ptr(), stmt_query.length(), FALSE, FALSE); stmt_query.ptr(), stmt_query.length(), FALSE, FALSE);
} }
} }
......
...@@ -1417,6 +1417,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode) ...@@ -1417,6 +1417,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
query_cache_invalidate3(thd, view, 0); query_cache_invalidate3(thd, view, 0);
sp_cache_invalidate(); sp_cache_invalidate();
} }
if (mysql_bin_log.is_open()) if (mysql_bin_log.is_open())
{ {
thd->clear_error(); thd->clear_error();
...@@ -1424,24 +1425,34 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode) ...@@ -1424,24 +1425,34 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
thd->query, thd->query_length, FALSE, FALSE); thd->query, thd->query_length, FALSE, FALSE);
} }
VOID(pthread_mutex_unlock(&LOCK_open));
if (error) if (error)
{ {
VOID(pthread_mutex_unlock(&LOCK_open));
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
if (wrong_object_name) if (wrong_object_name)
{ {
VOID(pthread_mutex_unlock(&LOCK_open));
my_error(ER_WRONG_OBJECT, MYF(0), wrong_object_db, wrong_object_name, my_error(ER_WRONG_OBJECT, MYF(0), wrong_object_db, wrong_object_name,
"VIEW"); "VIEW");
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
if (non_existant_views.length()) if (non_existant_views.length())
{ {
VOID(pthread_mutex_unlock(&LOCK_open));
my_error(ER_BAD_TABLE_ERROR, MYF(0), non_existant_views.c_ptr()); my_error(ER_BAD_TABLE_ERROR, MYF(0), non_existant_views.c_ptr());
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
if (mysql_bin_log.is_open())
{
thd->clear_error();
thd->binlog_query(THD::STMT_QUERY_TYPE,
thd->query, thd->query_length, FALSE, FALSE);
}
send_ok(thd); send_ok(thd);
VOID(pthread_mutex_unlock(&LOCK_open));
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
} }
......
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