Commit edbab357 authored by unknown's avatar unknown

Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl

into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
client/mysqldump.c:
  Merge main->rpl
mysql-test/r/mysqldump.result:
  Restore of main mysqldump test files in rpl tree (only added echo and one test case for bug 13926)
  Printouts not yet added to result file
mysql-test/t/mysqldump.test:
  Restore of main mysqldump test files in rpl tree (only added echo and one test case for bug 13926)
parents 665ebc05 447f2333
This diff is collapsed.
...@@ -91,3 +91,18 @@ c ...@@ -91,3 +91,18 @@ c
---> Cleaning up... ---> Cleaning up...
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; 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;
This diff is collapsed.
...@@ -129,3 +129,23 @@ DROP TABLE t1; ...@@ -129,3 +129,23 @@ DROP TABLE t1;
--sync_with_master --sync_with_master
--connection 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;
...@@ -4765,6 +4765,19 @@ mysql_execute_command(THD *thd) ...@@ -4765,6 +4765,19 @@ mysql_execute_command(THD *thd)
} }
append_identifier(thd, &buff, first_table->table_name, append_identifier(thd, &buff, first_table->table_name,
first_table->table_name_length); 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(STRING_WITH_LEN(" AS "));
buff.append(first_table->source.str, first_table->source.length); buff.append(first_table->source.str, first_table->source.length);
......
...@@ -6921,6 +6921,9 @@ load: LOAD DATA_SYM ...@@ -6921,6 +6921,9 @@ load: LOAD DATA_SYM
YYABORT; YYABORT;
} }
lex->sql_command = SQLCOM_LOAD_MASTER_TABLE; lex->sql_command = SQLCOM_LOAD_MASTER_TABLE;
WARN_DEPRECATED("LOAD TABLE FROM MASTER",
"mysqldump or future "
"BACKUP/RESTORE DATABASE facility");
if (!Select->add_table_to_list(YYTHD, $3, NULL, TL_OPTION_UPDATING)) if (!Select->add_table_to_list(YYTHD, $3, NULL, TL_OPTION_UPDATING))
YYABORT; YYABORT;
}; };
...@@ -6959,6 +6962,9 @@ load_data: ...@@ -6959,6 +6962,9 @@ load_data:
FROM MASTER_SYM FROM MASTER_SYM
{ {
Lex->sql_command = SQLCOM_LOAD_MASTER_DATA; Lex->sql_command = SQLCOM_LOAD_MASTER_DATA;
WARN_DEPRECATED("LOAD DATA FROM MASTER",
"mysqldump or future "
"BACKUP/RESTORE DATABASE facility");
}; };
opt_local: opt_local:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment