Commit ecf54df9 authored by jani@linux.local's avatar jani@linux.local

Fixed some minor issues, revealed by compiler warnings when using

BUILD/compile-pentium-debug-max
parent 7a1fddaa
...@@ -49,6 +49,7 @@ jani@dsl-kpogw4gb5.dial.inet.fi ...@@ -49,6 +49,7 @@ jani@dsl-kpogw4gb5.dial.inet.fi
jani@hynda.(none) jani@hynda.(none)
jani@hynda.mysql.fi jani@hynda.mysql.fi
jani@janikt.pp.saunalahti.fi jani@janikt.pp.saunalahti.fi
jani@linux.local
jani@rhols221.adsl.netsonic.fi jani@rhols221.adsl.netsonic.fi
jani@rhols221.arenanet.fi jani@rhols221.arenanet.fi
jani@ua126d19.elisa.omakaista.fi jani@ua126d19.elisa.omakaista.fi
......
...@@ -3144,6 +3144,11 @@ Item_func_sp::fix_length_and_dec() ...@@ -3144,6 +3144,11 @@ Item_func_sp::fix_length_and_dec()
decimals= 0; decimals= 0;
max_length= 21; max_length= 21;
break; break;
case ROW_RESULT:
default:
// This case should never be choosen
DBUG_ASSERT(0);
break;
} }
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
...@@ -1014,6 +1014,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, ...@@ -1014,6 +1014,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
SEL_IMERGE *min_imerge= NULL; SEL_IMERGE *min_imerge= NULL;
double min_imerge_cost= DBL_MAX; double min_imerge_cost= DBL_MAX;
ha_rows min_imerge_records; ha_rows min_imerge_records;
LINT_INIT(min_imerge_records); // Protected by min_imerge
List_iterator_fast<SEL_IMERGE> it(tree->merges); List_iterator_fast<SEL_IMERGE> it(tree->merges);
while ((imerge= it++)) while ((imerge= it++))
......
...@@ -1140,7 +1140,9 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg) ...@@ -1140,7 +1140,9 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
/* request for new delayed insert */ /* request for new delayed insert */
if (!(thd->lock=mysql_lock_tables(thd,&di->table,1))) if (!(thd->lock=mysql_lock_tables(thd,&di->table,1)))
{ {
di->dead=thd->killed= THD::KILL_CONNECTION; // Fatal error /* Fatal error */
di->dead= 1;
thd->killed= THD::KILL_CONNECTION;
} }
pthread_cond_broadcast(&di->cond_client); pthread_cond_broadcast(&di->cond_client);
} }
...@@ -1148,7 +1150,9 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg) ...@@ -1148,7 +1150,9 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
{ {
if (di->handle_inserts()) if (di->handle_inserts())
{ {
di->dead=thd->killed=THD::KILL_CONNECTION; // Some fatal error /* Some fatal error */
di->dead= 1;
thd->killed= THD::KILL_CONNECTION;
} }
} }
di->status=0; di->status=0;
...@@ -1175,7 +1179,8 @@ end: ...@@ -1175,7 +1179,8 @@ end:
close_thread_tables(thd); // Free the table close_thread_tables(thd); // Free the table
di->table=0; di->table=0;
di->dead=thd->killed= THD::KILL_CONNECTION; // If error di->dead= 1; // If error
thd->killed= THD::KILL_CONNECTION; // If error
pthread_cond_broadcast(&di->cond_client); // Safety pthread_cond_broadcast(&di->cond_client); // Safety
pthread_mutex_unlock(&di->mutex); pthread_mutex_unlock(&di->mutex);
......
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