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.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 7169b5dd068..3b9c1c81fd7 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3534,8 +3534,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 +3549,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 +4391,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 +4510,7 @@ end_with_restore_list:
}
#endif
}
+ /* fall through */
case SQLCOM_INSERT:
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
@@ -5442,6 +5443,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 +7356,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 +7372,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;