List:Internals« Previous MessageNext Message »
From:eugene Date:September 13 2005 6:22pm
Subject:bk commit into 5.0 tree (evgen:1.1953)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.1953 05/09/13 22:22:51 evgen@stripped +3 -0
  Merge

  mysql-test/t/view.test
    1.106 05/09/13 22:22:50 evgen@stripped +0 -0
    SCCS merged

  mysql-test/r/view.result
    1.111 05/09/13 22:22:50 evgen@stripped +0 -0
    SCCS merged

  sql/sql_base.cc
    1.300 05/09/13 22:21:36 evgen@stripped +0 -0
    Auto 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:	evgen
# Host:	moonbone.local
# Root:	/work/12993-bug-5.0-mysql/RESYNC

--- 1.299/sql/sql_base.cc	2005-09-12 02:46:28 +04:00
+++ 1.300/sql/sql_base.cc	2005-09-13 22:21:36 +04:00
@@ -1030,23 +1030,23 @@
 
   SYNOPSIS
     open_table()
-      thd         Thread context
-      table_list  Open first table in list
-      refresh     Pointer to memory that will be set to 1 if
-                  we need to close all tables and reopen them
-                  If this is a NULL pointer, then the is no version
-                  number checking and the table is not put in the
-                  thread-open-list
-      flags       Bitmap of flags to modify how open works:
-                    MYSQL_LOCK_IGNORE_FLUSH - Open table even if someone
-                    has done a flush or namelock on it.
+    thd                 Thread context.
+    table_list          Open first table in list.
+    refresh      INOUT  Pointer to memory that will be set to 1 if
+                        we need to close all tables and reopen them.
+                        If this is a NULL pointer, then the table is not
+                        put in the thread-open-list.
+    flags               Bitmap of flags to modify how open works:
+                          MYSQL_LOCK_IGNORE_FLUSH - Open table even if
+                          someone has done a flush or namelock on it.
+                          No version number checking is done.
 
   IMPLEMENTATION
     Uses a cache of open tables to find a table not in use.
 
   RETURN
     NULL  Open failed.  If refresh is set then one should close
-          all other tables and retry the open
+          all other tables and retry the open.
     #     Success. Pointer to TABLE object for open table.
 */
 
@@ -1201,10 +1201,12 @@
 
   if (!thd->open_tables)
     thd->version=refresh_version;
-  else if (thd->version != refresh_version && refresh)
+  else if ((thd->version != refresh_version) &&
+           ! (flags & MYSQL_LOCK_IGNORE_FLUSH))
   {
     /* Someone did a refresh while thread was opening tables */
-    *refresh=1;
+    if (refresh)
+      *refresh=1;
     VOID(pthread_mutex_unlock(&LOCK_open));
     DBUG_RETURN(0);
   }
@@ -3419,7 +3421,7 @@
   {
     if (find_length != curr_str->length())
       continue;
-    if (!strncmp(find, curr_str->ptr(), find_length))
+    if (!my_strcasecmp(system_charset_info, find, curr_str->ptr()))
       return TRUE;
   }
   return FALSE;

--- 1.110/mysql-test/r/view.result	2005-09-12 02:46:14 +04:00
+++ 1.111/mysql-test/r/view.result	2005-09-13 22:22:50 +04:00
@@ -1146,11 +1146,11 @@
 alter view v1 as select * from v2;
 ERROR 42S02: Table 'test.v1' doesn't exist
 alter view v1 as select * from v1;
-ERROR 42000: Not unique table/alias: 'v1'
+ERROR 42S02: Table 'test.v1' doesn't exist
 create or replace view v1 as select * from v2;
 ERROR 42S02: Table 'test.v1' doesn't exist
 create or replace view v1 as select * from v1;
-ERROR 42000: Not unique table/alias: 'v1'
+ERROR 42S02: Table 'test.v1' doesn't exist
 drop view v2,v1;
 drop table t1;
 create table t1 (a int);
@@ -2186,6 +2186,10 @@
 120001a080000542	guser02
 drop view v1, v2;
 drop table t1, t2;
+create table t1 (s1 int);
+create view abc as select * from t1 as abc;
+drop table t1;
+drop view abc;
 create table t1(f1 char(1));
 create view v1 as select * from t1;
 select * from (select f1 as f2 from v1) v where v.f2='a';

--- 1.105/mysql-test/t/view.test	2005-09-12 02:46:21 +04:00
+++ 1.106/mysql-test/t/view.test	2005-09-13 22:22:50 +04:00
@@ -1083,11 +1083,11 @@
 create view v2 as select * from v1;
 -- error 1146
 alter view v1 as select * from v2;
--- error 1066
+-- error 1146
 alter view v1 as select * from v1;
 -- error 1146
 create or replace view v1 as select * from v2;
--- error 1066
+-- error 1146
 create or replace view v1 as select * from v1;
 drop view v2,v1;
 drop table t1;
@@ -2059,6 +2059,15 @@
 
 drop view v1, v2;
 drop table t1, t2;
+
+#
+# Bug #6808 - Views: CREATE VIEW v ... FROM t AS v fails
+#
+
+create table t1 (s1 int); 
+create view abc as select * from t1 as abc;
+drop table t1;
+drop view abc;
 
 #
 # Bug #12993 View column rename broken in subselect
Thread
bk commit into 5.0 tree (evgen:1.1953)eugene13 Sep