summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 174d57b99af..fbfbe0f77fb 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -392,7 +392,7 @@ const LEX_STRING command_name[257]={
{ 0, 0 }, //247
{ 0, 0 }, //248
{ 0, 0 }, //249
- { 0, 0 }, //250
+ { C_STRING_WITH_LEN("Bulk_execute") }, //250
{ C_STRING_WITH_LEN("Slave_worker") }, //251
{ C_STRING_WITH_LEN("Slave_IO") }, //252
{ C_STRING_WITH_LEN("Slave_SQL") }, //253
@@ -1754,6 +1754,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
}
break;
}
+ case COM_STMT_BULK_EXECUTE:
+ {
+ mysqld_stmt_bulk_execute(thd, packet, packet_length);
+ break;
+ }
case COM_STMT_EXECUTE:
{
mysqld_stmt_execute(thd, packet, packet_length);
@@ -3534,8 +3539,8 @@ mysql_execute_command(THD *thd)
MYF(0));
goto error;
}
- /* no break; fall through */
}
+ /* fall through */
case SQLCOM_SHOW_STATUS_PROC:
case SQLCOM_SHOW_STATUS_FUNC:
case SQLCOM_SHOW_DATABASES:
@@ -3549,7 +3554,7 @@ mysql_execute_command(THD *thd)
case SQLCOM_SELECT:
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd))
goto error;
-
+ /* fall through */
case SQLCOM_SHOW_PLUGINS:
case SQLCOM_SHOW_VARIABLES:
case SQLCOM_SHOW_CHARSETS:
@@ -4391,8 +4396,8 @@ end_with_restore_list:
/* mysql_update return 2 if we need to switch to multi-update */
if (up_result != 2)
break;
- /* Fall through */
}
+ /* Fall through */
case SQLCOM_UPDATE_MULTI:
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
@@ -4510,6 +4515,7 @@ end_with_restore_list:
}
#endif
}
+ /* fall through */
case SQLCOM_INSERT:
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
@@ -5442,6 +5448,7 @@ end_with_restore_list:
initialize this variable because RESET shares the same code as FLUSH
*/
lex->no_write_to_binlog= 1;
+ /* fall through */
case SQLCOM_FLUSH:
{
int write_to_binlog;
@@ -7354,12 +7361,6 @@ bool check_fk_parent_table_access(THD *thd,
****************************************************************************/
-#if STACK_DIRECTION < 0
-#define used_stack(A,B) (long) (A - B)
-#else
-#define used_stack(A,B) (long) (B - A)
-#endif
-
#ifndef DBUG_OFF
long max_stack_used;
#endif
@@ -7376,7 +7377,7 @@ bool check_stack_overrun(THD *thd, long margin,
{
long stack_used;
DBUG_ASSERT(thd == current_thd);
- if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=
+ if ((stack_used= available_stack_size(thd->thread_stack, &stack_used)) >=
(long) (my_thread_stack_size - margin))
{
thd->is_fatal_error= 1;