List:Commits« Previous MessageNext Message »
From:Gleb Shchepa Date:April 8 2011 8:26am
Subject:bzr push into mysql-trunk branch (gleb.shchepa:3341 to 3342)
View as plain text  
 3342 Gleb Shchepa	2011-04-08 [merge]
      auto-merge 5.5-->trunk (bug 11829681)

    modified:
      mysql-test/r/view.result
      mysql-test/t/view.test
      sql/item.cc
      sql/item.h
 3341 Nirbhay Choubey	2011-04-08 [merge]
      Merging patch for bug#11765157 from mysql-5.5.

    modified:
      client/client_priv.h
      client/mysqlslap.c
      mysql-test/r/mysqlslap.result
      mysql-test/t/mysqlslap.test
=== modified file 'mysql-test/r/view.result'
--- a/mysql-test/r/view.result	2011-03-08 19:14:42 +0000
+++ b/mysql-test/r/view.result	2011-04-08 08:15:19 +0000
@@ -4012,6 +4012,15 @@ DROP TABLE t1;
 #
 CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
 DROP VIEW v1;
+#
+# Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
+#
+CREATE TABLE t1 (a INT);
+CREATE VIEW v1 AS SELECT s.* FROM t1 s, t1 b HAVING a;
+SELECT * FROM v1;
+a
+DROP VIEW v1;
+DROP TABLE t1;
 # -----------------------------------------------------------------
 # -- End of 5.1 tests.
 # -----------------------------------------------------------------

=== modified file 'mysql-test/t/view.test'
--- a/mysql-test/t/view.test	2011-03-08 19:14:42 +0000
+++ b/mysql-test/t/view.test	2011-04-08 08:15:19 +0000
@@ -3989,6 +3989,18 @@ DROP TABLE t1;
 CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
 DROP VIEW v1;
 
+--echo #
+--echo # Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE VIEW v1 AS SELECT s.* FROM t1 s, t1 b HAVING a;
+
+SELECT * FROM v1; 
+
+DROP VIEW v1;
+DROP TABLE t1;
+
 --echo # -----------------------------------------------------------------
 --echo # -- End of 5.1 tests.
 --echo # -----------------------------------------------------------------

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2011-04-07 10:45:24 +0000
+++ b/sql/item.cc	2011-04-08 08:15:19 +0000
@@ -6576,7 +6576,7 @@ void Item_ref::print(String *str, enum_q
     {
       THD *thd= current_thd;
       append_identifier(thd, str, (*ref)->real_item()->name,
-                        (*ref)->real_item()->name_length);
+                        strlen((*ref)->real_item()->name));
     }
     else
       (*ref)->print(str, query_type);

=== modified file 'sql/item.h'
--- a/sql/item.h	2011-03-22 11:44:40 +0000
+++ b/sql/item.h	2011-04-08 08:15:19 +0000
@@ -549,6 +549,10 @@ public:
    */
   Item *next;
   uint32 max_length;                    /* Maximum length, in bytes */
+  /*
+    TODO: convert name and name_length fields into String to keep them in sync
+    (see bug #11829681/60295 etc).
+  */
   uint name_length;                     /* Length of name */
   int8 marker;
   uint8 decimals;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (gleb.shchepa:3341 to 3342) Gleb Shchepa8 Apr