List:Internals« Previous MessageNext Message »
From:guilhem Date:November 4 2005 9:54am
Subject:bk commit into 5.0 tree (guilhem:1.1965)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of guilhem. When guilhem 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
  1.1965 05/11/04 10:54:51 guilhem@stripped +1 -0
  sql_parse.cc:
    SCCS merged

  sql/sql_parse.cc
    1.509 05/11/04 10:54:45 guilhem@stripped +0 -0
    SCCS merged

# 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:	guilhem
# Host:	gbichot3.local
# Root:	/home/mysql_src/mysql-5.0/RESYNC

--- 1.508/sql/sql_parse.cc	2005-10-20 10:14:20 +02:00
+++ 1.509/sql/sql_parse.cc	2005-11-04 10:54:45 +01:00
@@ -1779,6 +1779,8 @@
     /* Saved variable value */
     my_bool old_innodb_table_locks= 
               IF_INNOBASE_DB(thd->variables.innodb_table_locks, FALSE);
+    /* used as fields initializator */
+    lex_start(thd, 0, 0);
 
 
     statistic_increment(thd->status_var.com_stat[SQLCOM_SHOW_FIELDS],
@@ -5053,8 +5055,14 @@
 {
   uint found=0;
   ulong found_access=0;
-  TABLE_LIST *org_tables=tables;
-  for (; tables; tables= tables->next_global)
+  TABLE_LIST *org_tables= tables;
+  TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table();
+  /*
+    The check that first_not_own_table is not reached is for the case when
+    the given table list refers to the list for prelocking (contains tables
+    of other queries). For simple queries first_not_own_table is 0.
+  */
+  for (; tables != first_not_own_table; tables= tables->next_global)
   {
     if (tables->schema_table && 
         (want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL)))
@@ -5065,6 +5073,11 @@
                  information_schema_name.str);
       return TRUE;
     }
+    /*
+       Register access for view underlying table.
+       Remove SHOW_VIEW_ACL, because it will be checked during making view
+     */
+    tables->grant.orig_want_privilege= (want_access & ~SHOW_VIEW_ACL);
     if (tables->derived || tables->schema_table || tables->belong_to_view ||
         (tables->table && (int)tables->table->s->tmp_table) ||
         my_tz_check_n_skip_implicit_tables(&tables,
@@ -5818,7 +5831,7 @@
   case FIELD_TYPE_NULL:
     break;
   case FIELD_TYPE_NEWDECIMAL:
-    if (!length)
+    if (!length && !new_field->decimals)
       new_field->length= 10;
     if (new_field->length > DECIMAL_MAX_PRECISION)
     {
@@ -6224,8 +6237,8 @@
   ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX);
   ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES);
   ptr->derived=	    table->sel;
-  if (!my_strcasecmp(system_charset_info, ptr->db,
-                     information_schema_name.str))
+  if (!ptr->derived && !my_strcasecmp(system_charset_info, ptr->db,
+                                      information_schema_name.str))
   {
     ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->table_name);
     if (!schema_table ||
Thread
bk commit into 5.0 tree (guilhem:1.1965)guilhem4 Nov