Below is the list of changes that have just been committed into a local
5.0 repository of alexi. When alexi 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-09-18 03:21:00+04:00, aivanov@stripped +3 -0
BUG#19419: VIEW: View that the column name is different
by master and slave is made.
mysql-test/r/rpl_view.result@stripped, 2006-09-18 03:20:56+04:00, aivanov@stripped +15 -0
BUG#19419: VIEW: View that the column name is different
by master and slave is made.
Fixed result for the added test case.
mysql-test/t/rpl_view.test@stripped, 2006-09-18 03:20:56+04:00, aivanov@stripped +20 -0
BUG#19419: VIEW: View that the column name is different
by master and slave is made.
Added test case.
sql/sql_parse.cc@stripped, 2006-09-18 03:20:56+04:00, aivanov@stripped +13 -0
BUG#19419: VIEW: View that the column name is different
by master and slave is made.
Fixed: Add column_list to to the view creation statement
which is written to binlog.
# 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: aivanov
# Host: mysqld.localdomain
# Root: /home/alexi/bugs/mysql-5.0-19419-new
--- 1.565/sql/sql_parse.cc 2006-09-18 03:21:06 +04:00
+++ 1.566/sql/sql_parse.cc 2006-09-18 03:21:06 +04:00
@@ -4765,6 +4765,19 @@
}
append_identifier(thd, &buff, first_table->table_name,
first_table->table_name_length);
+ if (lex->view_list.elements)
+ {
+ List_iterator_fast<LEX_STRING> names(lex->view_list);
+ LEX_STRING *name;
+ int i;
+
+ for (i= 0; name= names++; i++)
+ {
+ buff.append(i ? ", " : "(");
+ append_identifier(thd, &buff, name->str, name->length);
+ }
+ buff.append(')');
+ }
buff.append(STRING_WITH_LEN(" AS "));
buff.append(first_table->source.str, first_table->source.length);
--- 1.5/mysql-test/r/rpl_view.result 2006-09-18 03:21:06 +04:00
+++ 1.6/mysql-test/r/rpl_view.result 2006-09-18 03:21:06 +04:00
@@ -91,3 +91,18 @@
---> Cleaning up...
DROP VIEW v1;
DROP TABLE t1;
+create table t1(a int, b int);
+insert into t1 values (1, 1), (1, 2), (1, 3);
+create view v1(a, b) as select a, sum(b) from t1 group by a;
+explain v1;
+Field Type Null Key Default Extra
+a int(11) YES NULL
+b decimal(32,0) YES NULL
+show create table v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select `t1`.`a` AS `a`,sum(`t1`.`b`) AS `b` from `t1` group by `t1`.`a`
+select * from v1;
+a b
+1 6
+drop table t1;
+drop view v1;
--- 1.4/mysql-test/t/rpl_view.test 2006-09-18 03:21:06 +04:00
+++ 1.5/mysql-test/t/rpl_view.test 2006-09-18 03:21:06 +04:00
@@ -129,3 +129,23 @@
--sync_with_master
--connection master
+#
+# BUG#19419: "VIEW: View that the column name is different
+# by master and slave is made".
+#
+connection master;
+create table t1(a int, b int);
+insert into t1 values (1, 1), (1, 2), (1, 3);
+create view v1(a, b) as select a, sum(b) from t1 group by a;
+
+sync_slave_with_master;
+explain v1;
+show create table v1;
+select * from v1;
+
+connection master;
+drop table t1;
+drop view v1;
+
+sync_slave_with_master;
+
| Thread |
|---|
| • bk commit into 5.0 tree (aivanov:1.2257) BUG#19419 | Alex Ivanov Notebook | 17 Sep |