List:Commits« Previous MessageNext Message »
From:marc.alff Date:December 19 2006 10:02pm
Subject:bk commit into 5.1 tree (malff:1.2361) BUG#25183
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of marcsql. When marcsql does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-12-19 15:02:37-07:00, malff@weblab.(none) +2 -0
  Bug#25183 (Compiler warnings in the sql directory (GCC 4.1))
  Fixed compiler warnings.
  
  In set_var.cc, the code was not properly returning an error code
  if close_cached_tables() failed.
  
  In sql_tables.cc, the code was not returning properly an error code
  if lock_table_names() failed.
  
  Both cases are bugs, introduced in 5.1 only by recent changes.

  sql/set_var.cc@stripped, 2006-12-19 14:57:48-07:00, malff@weblab.(none) +1 -1
    Fixed build warnings:
    set_var.cc:3861: warning: 'result' may be used uninitialized in this function

  sql/sql_table.cc@stripped, 2006-12-19 14:57:48-07:00, malff@weblab.(none) +10 -3
    Fixed build warnings:
    sql_table.cc:5307: warning: 'error' may be used uninitialized in this function

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	malff
# Host:	weblab.(none)
# Root:	/home/marcsql/TREE/mysql-5.1-25183

--- 1.379/sql/sql_table.cc	2006-12-19 15:02:43 -07:00
+++ 1.380/sql/sql_table.cc	2006-12-19 15:02:43 -07:00
@@ -5406,16 +5406,19 @@ bool mysql_alter_table(THD *thd,char *ne
     {
       my_message(ER_LOCK_OR_ACTIVE_TRANSACTION,
                  ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
-      DBUG_RETURN(1);
+      DBUG_RETURN(TRUE);
     }
 
     if (wait_if_global_read_lock(thd,0,1))
-      DBUG_RETURN(1);
+      DBUG_RETURN(TRUE);
     VOID(pthread_mutex_lock(&LOCK_open));
     if (lock_table_names(thd, table_list))
+    {
+      error= TRUE;
       goto view_err;
+    }
     
-    error=0;
+    error= FALSE;
     if (!do_rename(thd, table_list, new_db, new_name, new_name, 1))
     {
       if (mysql_bin_log.is_open())
@@ -5555,6 +5558,10 @@ view_err:
       wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
       error=table->file->disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
       /* COND_refresh will be signaled in close_thread_tables() */
+      break;
+    default:
+      DBUG_ASSERT(FALSE);
+      error= 0;
       break;
     }
     if (error == HA_ERR_WRONG_COMMAND)

--- 1.207/sql/set_var.cc	2006-12-19 15:02:43 -07:00
+++ 1.208/sql/set_var.cc	2006-12-19 15:02:43 -07:00
@@ -3904,7 +3904,7 @@ bool sys_var_opt_readonly::update(THD *t
     can cause to wait on a read lock, it's required for the client application
     to unlock everything, and acceptable for the server to wait on all locks.
   */
-  if (close_cached_tables(thd, true, NULL, false))
+  if (result= close_cached_tables(thd, true, NULL, false))
     goto end_with_read_lock;
 
   if (result= make_global_read_lock_block_commit(thd))
Thread
bk commit into 5.1 tree (malff:1.2361) BUG#25183marc.alff19 Dec