Commit 0e2af2cd authored by Tor Didriksen's avatar Tor Didriksen

Bug#12406055 post-push fix: unused variable 'num_chars' in optimized build.

Also fixed possibly uninitialized use of need_copy_table_res.
parent 2e7dd626
...@@ -188,7 +188,8 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs) ...@@ -188,7 +188,8 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs)
#else #else
#ifdef HAVE_SNPRINTF #ifdef HAVE_SNPRINTF
buff[sizeof(buff)-1]=0; // Safety buff[sizeof(buff)-1]=0; // Safety
int num_chars= snprintf(buff, sizeof(buff)-1, "%.*f",(int) decimals, num); IF_DBUG(int num_chars= )
snprintf(buff, sizeof(buff)-1, "%.*f",(int) decimals, num);
DBUG_ASSERT(num_chars > 0); DBUG_ASSERT(num_chars > 0);
DBUG_ASSERT(num_chars < (int) sizeof(buff)); DBUG_ASSERT(num_chars < (int) sizeof(buff));
#else #else
......
...@@ -6985,7 +6985,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -6985,7 +6985,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
need_copy_table= ALTER_TABLE_DATA_CHANGED; need_copy_table= ALTER_TABLE_DATA_CHANGED;
else else
{ {
enum_alter_table_change_level need_copy_table_res; enum_alter_table_change_level need_copy_table_res=ALTER_TABLE_METADATA_ONLY;
/* Check how much the tables differ. */ /* Check how much the tables differ. */
if (compare_tables(table, alter_info, if (compare_tables(table, alter_info,
create_info, order_num, create_info, order_num,
......
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