List:Commits« Previous MessageNext Message »
From:monty Date:March 24 2007 9:06am
Subject:bk commit into 5.1 tree (monty:1.2505)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of monty. When monty 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, 2007-03-24 11:06:09+02:00, monty@stripped +4 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
  into  mysql.com:/home/my/mysql-5.1
  MERGE: 1.2473.20.5

  client/mysqladmin.cc@stripped, 2007-03-24 11:06:05+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.118.1.1

  client/mysqlbinlog.cc@stripped, 2007-03-24 11:06:05+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.149.1.1

  sql/sql_base.cc@stripped, 2007-03-24 11:06:05+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.388.1.2

  sql/sql_view.cc@stripped, 2007-03-24 11:06:05+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.124.1.1

# 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:	monty
# Host:	narttu.mysql.fi
# Root:	/home/my/mysql-5.1/RESYNC

--- 1.119/client/mysqladmin.cc	2007-03-09 11:15:31 +02:00
+++ 1.120/client/mysqladmin.cc	2007-03-24 11:06:05 +02:00
@@ -287,14 +287,9 @@
 #endif
     break;
   case OPT_MYSQL_PROTOCOL:
-  {
-    if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
-    {
-      fprintf(stderr, "Unknown option to protocol: %s\n", argument);
-      exit(1);
-    }
+    opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
+                                    opt->name);
     break;
-  }
   }
   if (error)
   {

--- 1.150/client/mysqlbinlog.cc	2007-03-19 11:19:46 +02:00
+++ 1.151/client/mysqlbinlog.cc	2007-03-24 11:06:05 +02:00
@@ -158,11 +158,7 @@
 
 public:
   Load_log_processor() {}
-  ~Load_log_processor()
-  {
-    destroy();
-    delete_dynamic(&file_names);
-  }
+  ~Load_log_processor() {}
 
   int init()
   {
@@ -182,20 +178,22 @@
       target_dir_name_len= strlen(target_dir_name);
     }
   void destroy()
+  {
+    File_name_record *ptr= (File_name_record *)file_names.buffer;
+    File_name_record *end= ptr + file_names.elements;
+    for (; ptr < end; ptr++)
     {
-      File_name_record *ptr= (File_name_record *)file_names.buffer;
-      File_name_record *end= ptr + file_names.elements;
-      for (; ptr<end; ptr++)
+      if (ptr->fname)
       {
-	if (ptr->fname)
-	{
-          my_free(ptr->fname, MYF(MY_WME));
-          delete ptr->event;
-          bzero((char *)ptr, sizeof(File_name_record));
-	}
+        my_free(ptr->fname, MYF(MY_WME));
+        delete ptr->event;
+        bzero((char *)ptr, sizeof(File_name_record));
       }
     }
 
+    delete_dynamic(&file_names);
+  }
+
   /*
     Obtain Create_file event for LOAD DATA statement by its file_id.
 
@@ -1572,6 +1570,7 @@
   cleanup();
   free_defaults(defaults_argv);
   my_free_open_file_info();
+  load_processor.destroy();
   /* We cannot free DBUG, it is used in global destructors after exit(). */
   my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);
 

--- 1.391/sql/sql_base.cc	2007-03-23 22:08:28 +02:00
+++ 1.392/sql/sql_base.cc	2007-03-24 11:06:05 +02:00
@@ -4490,14 +4490,35 @@
   {
     Field *cur_field= find_field_in_table_ref(thd, cur_table, name, length,
                                               item->name, db, table_name, ref,
-                                              check_privileges, allow_rowid,
+                                              check_privileges,
+                                              allow_rowid,
                                               &(item->cached_field_index),
                                               register_tree_change,
                                               &actual_table);
     if (cur_field)
     {
       if (cur_field == WRONG_GRANT)
-	return (Field*) 0;
+      {
+        if (thd->lex->sql_command != SQLCOM_SHOW_FIELDS)
+          return (Field*) 0;
+
+        thd->clear_error();
+        cur_field= find_field_in_table_ref(thd, cur_table, name, length,
+                                           item->name, db, table_name, ref,
+                                           false,
+                                           allow_rowid,
+                                           &(item->cached_field_index),
+                                           register_tree_change,
+                                           &actual_table);
+        if (cur_field)
+        {
+          Field *nf=new Field_null(NULL,0,Field::NONE,
+                                   cur_field->field_name,
+                                   &my_charset_bin);
+          nf->init(cur_table->table);
+          cur_field= nf;
+        }
+      }
 
       /*
         Store the original table of the field, which may be different from
@@ -4520,7 +4541,7 @@
             report_error == IGNORE_EXCEPT_NON_UNIQUE)
           my_error(ER_NON_UNIQ_ERROR, MYF(0),
                    table_name ? item->full_name() : name, thd->where);
-	return (Field*) 0;
+        return (Field*) 0;
       }
       found= cur_field;
     }

--- 1.126/sql/sql_view.cc	2007-03-22 23:05:42 +02:00
+++ 1.127/sql/sql_view.cc	2007-03-24 11:06:05 +02:00
@@ -1008,6 +1008,11 @@
     CHARSET_INFO *save_cs= thd->variables.character_set_client;
     thd->variables.character_set_client= system_charset_info;
     res= MYSQLparse((void *)thd);
+
+    if ((old_lex->sql_command == SQLCOM_SHOW_FIELDS) ||
+        (old_lex->sql_command == SQLCOM_SHOW_CREATE))
+        lex->sql_command= old_lex->sql_command;
+
     thd->variables.character_set_client= save_cs;
     thd->variables.sql_mode= save_mode;
   }
@@ -1033,7 +1038,7 @@
       }
     }
     else if (!table->prelocking_placeholder &&
-             old_lex->sql_command == SQLCOM_SHOW_CREATE &&
+             (old_lex->sql_command == SQLCOM_SHOW_CREATE) &&
              !table->belong_to_view)
     {
       if (check_table_access(thd, SHOW_VIEW_ACL, table, 0))
Thread
bk commit into 5.1 tree (monty:1.2505)monty24 Mar