Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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.1970 05/10/25 10:30:56 msvensson@neptunus.(none) +11 -0
BUG#10713 mysqldump includes database in create view and referenced tables
- Revert patch, always add dbname to view identifier
sql/table.h
1.115 05/10/25 10:29:29 msvensson@neptunus.(none) +0 -1
Remove variable compact_view_format
sql/sql_show.cc
1.283 05/10/25 10:29:29 msvensson@neptunus.(none) +2 -28
Remove detection of compact view format
sql/sql_select.cc
1.374 05/10/25 10:29:29 msvensson@neptunus.(none) +4 -14
Always print dbname as first part of view identifier
sql/item.cc
1.179 05/10/25 10:29:29 msvensson@neptunus.(none) +2 -6
Always print dbname as first part of view identifier
mysql-test/t/mysqldump.test
1.66 05/10/25 10:29:29 msvensson@neptunus.(none) +0 -33
Remove test for bug#10713
mysql-test/r/view.result
1.119 05/10/25 10:29:29 msvensson@neptunus.(none) +26 -26
Update test results
mysql-test/r/temp_table.result
1.19 05/10/25 10:29:28 msvensson@neptunus.(none) +1 -1
Update test results
mysql-test/r/sql_mode.result
1.29 05/10/25 10:29:28 msvensson@neptunus.(none) +2 -2
Update test results
mysql-test/r/mysqldump.result
1.72 05/10/25 10:29:28 msvensson@neptunus.(none) +4 -31
Update test results
mysql-test/r/lowercase_view.result
1.12 05/10/25 10:29:28 msvensson@neptunus.(none) +3 -3
Update test results
mysql-test/r/func_in.result
1.22 05/10/25 10:29:28 msvensson@neptunus.(none) +1 -1
Update test results
# 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: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug10713/my50-bug10713
--- 1.178/sql/item.cc 2005-09-14 08:10:12 +02:00
+++ 1.179/sql/item.cc 2005-10-25 10:29:29 +02:00
@@ -1533,12 +1533,8 @@
}
if (db_name && db_name[0] && !alias_name_used)
{
- if (!(cached_table && cached_table->belong_to_view &&
- cached_table->belong_to_view->compact_view_format))
- {
- append_identifier(thd, str, d_name, (uint)strlen(d_name));
- str->append('.');
- }
+ append_identifier(thd, str, d_name, (uint)strlen(d_name));
+ str->append('.');
append_identifier(thd, str, t_name, (uint)strlen(t_name));
str->append('.');
append_identifier(thd, str, field_name, (uint)strlen(field_name));
--- 1.373/sql/sql_select.cc 2005-09-15 20:19:41 +02:00
+++ 1.374/sql/sql_select.cc 2005-10-25 10:29:29 +02:00
@@ -13876,13 +13876,8 @@
if (view_name.str)
{
// A view
-
- if (!(belong_to_view &&
- belong_to_view->compact_view_format))
- {
- append_identifier(thd, str, view_db.str, view_db.length);
- str->append('.');
- }
+ append_identifier(thd, str, view_db.str, view_db.length);
+ str->append('.');
append_identifier(thd, str, view_name.str, view_name.length);
cmp_name= view_name.str;
}
@@ -13897,13 +13892,8 @@
else
{
// A normal table
-
- if (!(belong_to_view &&
- belong_to_view->compact_view_format))
- {
- append_identifier(thd, str, db, db_length);
- str->append('.');
- }
+ append_identifier(thd, str, db, db_length);
+ str->append('.');
if (schema_table)
{
append_identifier(thd, str, schema_table_name,
--- 1.282/sql/sql_show.cc 2005-09-15 14:39:39 +02:00
+++ 1.283/sql/sql_show.cc 2005-10-25 10:29:29 +02:00
@@ -1073,40 +1073,14 @@
MODE_DB2 |
MODE_MAXDB |
MODE_ANSI)) != 0;
- /*
- Compact output format for view can be used
- - if user has db of this view as current db
- - if this view only references table inside it's own db
- */
- if (!thd->db || strcmp(thd->db, table->view_db.str))
- table->compact_view_format= FALSE;
- else
- {
- TABLE_LIST *tbl;
- table->compact_view_format= TRUE;
- for (tbl= thd->lex->query_tables;
- tbl;
- tbl= tbl->next_global)
- {
- if (strcmp(table->view_db.str, tbl->view ? tbl->view_db.str :tbl->db)!=
0)
- {
- table->compact_view_format= FALSE;
- break;
- }
- }
- }
-
buff->append("CREATE ", 7);
if (!foreign_db_mode)
{
view_store_options(thd, table, buff);
}
buff->append("VIEW ", 5);
- if (!table->compact_view_format)
- {
- append_identifier(thd, buff, table->view_db.str, table->view_db.length);
- buff->append('.');
- }
+ append_identifier(thd, buff, table->view_db.str, table->view_db.length);
+ buff->append('.');
append_identifier(thd, buff, table->view_name.str, table->view_name.length);
buff->append(" AS ", 4);
--- 1.114/sql/table.h 2005-09-14 10:00:31 +02:00
+++ 1.115/sql/table.h 2005-10-25 10:29:29 +02:00
@@ -579,7 +579,6 @@
/* TRUE if this merged view contain auto_increment field */
bool contain_auto_increment;
bool multitable_view; /* TRUE iff this is multitable view */
- bool compact_view_format; /* Use compact format for SHOW CREATE VIEW */
/* view where processed */
bool where_processed;
/* db part was not defined in table definition */
--- 1.11/mysql-test/r/lowercase_view.result 2005-09-14 11:24:10 +02:00
+++ 1.12/mysql-test/r/lowercase_view.result 2005-10-25 10:29:28 +02:00
@@ -7,7 +7,7 @@
create view ViE as select * from TAb;
show create table VIe;
View Create View
-vie CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vie`
AS select `tab`.`Field` AS `Field` from `tab`
+vie CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`mysqltest`.`vie` AS select `mysqltest`.`tab`.`Field` AS `Field` from `mysqltest`.`tab`
drop database MySQLTest;
use test;
create table t1Aa (col1 int);
@@ -119,7 +119,7 @@
create view v1Aa as select col1 from t1Aa as AaA;
show create view v1AA;
View Create View
-v1aa CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`v1aa` AS select `aaa`.`col1` AS `col1` from `t1aa` `AaA`
+v1aa CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1aa` AS select `aaa`.`col1` AS `col1` from `test`.`t1aa` `AaA`
drop view v1AA;
select Aaa.col1 from t1Aa as AaA;
col1
@@ -128,6 +128,6 @@
create view v1Aa as select AaA.col1 from t1Aa as AaA;
show create view v1AA;
View Create View
-v1aa CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`v1aa` AS select `aaa`.`col1` AS `col1` from `t1aa` `AaA`
+v1aa CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1aa` AS select `aaa`.`col1` AS `col1` from `test`.`t1aa` `AaA`
drop view v1AA;
drop table t1Aa;
--- 1.118/mysql-test/r/view.result 2005-09-15 18:50:09 +02:00
+++ 1.119/mysql-test/r/view.result 2005-10-25 10:29:29 +02:00
@@ -32,10 +32,10 @@
11
show create table v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select (`t1`.`b` + 1) AS `c` from `t1`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select (`test`.`t1`.`b` + 1) AS `c` from `test`.`t1`
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select (`t1`.`b` + 1) AS `c` from `t1`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select (`test`.`t1`.`b` + 1) AS `c` from `test`.`t1`
show create view t1;
ERROR HY000: 'test.t1' is not VIEW
drop table t1;
@@ -55,7 +55,7 @@
create algorithm=temptable view v2 (c) as select b+1 from t1;
show create view v2;
View Create View
-v2 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2`
AS select (`t1`.`b` + 1) AS `c` from `t1`
+v2 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v2` AS select (`test`.`t1`.`b` + 1) AS `c` from `test`.`t1`
select c from v2;
c
3
@@ -550,7 +550,7 @@
create view v1 as select "a*b" from t1;
show create view v1;
View Create View
-v1 CREATE VIEW "v1" AS select "t1"."a*b" AS "a*b" from "t1"
+v1 CREATE VIEW "test"."v1" AS select "test"."t1"."a*b" AS "a*b" from "test"."t1"
drop view v1;
drop table t1;
set sql_mode=default;
@@ -657,7 +657,7 @@
CREATE VIEW v1 (f1,f2,f3,f4) AS SELECT connection_id(), pi(), current_user(), version();
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select sql_no_cache connection_id() AS `f1`,pi() AS `f2`,current_user() AS
`f3`,version() AS `f4`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select sql_no_cache connection_id() AS `f1`,pi() AS `f2`,current_user() AS
`f3`,version() AS `f4`
drop view v1;
create table t1 (s1 int);
create table t2 (s2 int);
@@ -691,13 +691,13 @@
create view v2 as select a from t2 where a in (select a from v1);
show create view v2;
View Create View
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2`
AS select `t2`.`a` AS `a` from `t2` where `a` in (select `v1`.`a` AS `a` from `v1`)
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v2` AS select `test`.`t2`.`a` AS `a` from `test`.`t2` where `a` in (select
`v1`.`a` AS `a` from `test`.`v1`)
drop view v2, v1;
drop table t1, t2;
CREATE VIEW `v 1` AS select 5 AS `5`;
show create view `v 1`;
View Create View
-v 1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v 1`
AS select 5 AS `5`
+v 1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v 1` AS select 5 AS `5`
drop view `v 1`;
create database mysqltest;
create table mysqltest.t1 (a int, b int);
@@ -765,14 +765,14 @@
1 1
show create view v3;
View Create View
-v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3`
AS select `v1`.`col1` AS `a`,`v2`.`col1` AS `b` from (`v1` join `v2`) where (`v1`.`col1`
= `v2`.`col1`)
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v3` AS select `v1`.`col1` AS `a`,`v2`.`col1` AS `b` from (`test`.`v1` join
`test`.`v2`) where (`v1`.`col1` = `v2`.`col1`)
drop view v3, v2, v1;
drop table t2, t1;
create function `f``1` () returns int return 5;
create view v1 as select test.`f``1` ();
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select sql_no_cache `test`.`f``1`() AS `test.``f````1`` ()`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select sql_no_cache `test`.`f``1`() AS `test.``f````1`` ()`
select * from v1;
test.`f``1` ()
5
@@ -789,10 +789,10 @@
create view v2 as select col1 collate latin1_german1_ci from t2;
show create view v2;
View Create View
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2`
AS select (`t2`.`col1` collate latin1_german1_ci) AS `col1 collate latin1_german1_ci`
from `t2`
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v2` AS select (`test`.`t2`.`col1` collate latin1_german1_ci) AS `col1 collate
latin1_german1_ci` from `test`.`t2`
show create view v2;
View Create View
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2`
AS select (`t2`.`col1` collate latin1_german1_ci) AS `col1 collate latin1_german1_ci`
from `t2`
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v2` AS select (`test`.`t2`.`col1` collate latin1_german1_ci) AS `col1 collate
latin1_german1_ci` from `test`.`t2`
drop view v2;
drop table t2;
create table t1 (a int);
@@ -819,7 +819,7 @@
create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1;
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select 99999999999999999999999999999999999999999999999999999 AS `col1`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select 99999999999999999999999999999999999999999999999999999 AS `col1`
drop view v1;
create table tü (cü char);
create view vü as select cü from tü;
@@ -840,7 +840,7 @@
create view v1 as select cast(1 as char(3));
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select cast(1 as char(3) charset latin1) AS `cast(1 as char(3))`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select cast(1 as char(3) charset latin1) AS `cast(1 as char(3))`
select * from v1;
cast(1 as char(3))
1
@@ -1157,19 +1157,19 @@
create view v1 as select * from t1;
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select `t1`.`a` AS `a` from `t1`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`
alter algorithm=undefined view v1 as select * from t1 with check option;
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select `t1`.`a` AS `a` from `t1` WITH CASCADED CHECK OPTION
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` WITH CASCADED CHECK OPTION
alter algorithm=merge view v1 as select * from t1 with cascaded check option;
show create view v1;
View Create View
-v1 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS
select `t1`.`a` AS `a` from `t1` WITH CASCADED CHECK OPTION
+v1 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` WITH CASCADED CHECK OPTION
alter algorithm=temptable view v1 as select * from t1;
show create view v1;
View Create View
-v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select `t1`.`a` AS `a` from `t1`
+v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`
drop view v1;
drop table t1;
create table t1 (s1 int);
@@ -1841,24 +1841,24 @@
create view v1 as select a,b,t1.a < now() from t1,t2 where t1.a < now();
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select sql_no_cache `t1`.`a` AS `a`,`t2`.`b` AS `b`,(`t1`.`a` < now()) AS `t1.a
< now()` from (`t1` join `t2`) where (`t1`.`a` < now())
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select sql_no_cache `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS
`b`,(`test`.`t1`.`a` < now()) AS `t1.a < now()` from (`test`.`t1` join `test`.`t2`)
where (`test`.`t1`.`a` < now())
drop view v1;
drop table t1, t2;
CREATE TABLE t1 ( a varchar(50) );
CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = CURRENT_USER();
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select sql_no_cache `t1`.`a` AS `a` from `t1` where (`t1`.`a` = current_user())
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select sql_no_cache `test`.`t1`.`a` AS `a` from `test`.`t1` where
(`test`.`t1`.`a` = current_user())
DROP VIEW v1;
CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = VERSION();
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select `t1`.`a` AS `a` from `t1` where (`t1`.`a` = version())
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` =
version())
DROP VIEW v1;
CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = DATABASE();
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select sql_no_cache `t1`.`a` AS `a` from `t1` where (`t1`.`a` = database())
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select sql_no_cache `test`.`t1`.`a` AS `a` from `test`.`t1` where
(`test`.`t1`.`a` = database())
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (col1 time);
@@ -1949,7 +1949,7 @@
create view v1 as select var_samp(s1) from t1;
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select var_samp(`t1`.`s1`) AS `var_samp(s1)` from `t1`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select var_samp(`test`.`t1`.`s1`) AS `var_samp(s1)` from `test`.`t1`
drop view v1;
drop table t1;
set sql_mode='strict_all_tables';
@@ -2193,7 +2193,7 @@
Note 1449 There is not some_user@localhost registered
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`localhost` SQL SECURITY INVOKER VIEW
`v1` AS select 1 AS `1`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`localhost` SQL SECURITY INVOKER VIEW
`test`.`v1` AS select 1 AS `1`
drop view v1;
create table t1 (s1 int);
create view abc as select * from t1 as abc;
@@ -2215,15 +2215,15 @@
CREATE VIEW v1 AS SELECT DAYNAME(date) FROM t1;
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select dayname(`t1`.`date`) AS `DAYNAME(date)` from `t1`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select dayname(`test`.`t1`.`date`) AS `DAYNAME(date)` from `test`.`t1`
CREATE VIEW v2 AS SELECT DAYOFWEEK(date) FROM t1;
SHOW CREATE VIEW v2;
View Create View
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2`
AS select dayofweek(`t1`.`date`) AS `DAYOFWEEK(date)` from `t1`
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v2` AS select dayofweek(`test`.`t1`.`date`) AS `DAYOFWEEK(date)` from `test`.`t1`
CREATE VIEW v3 AS SELECT WEEKDAY(date) FROM t1;
SHOW CREATE VIEW v3;
View Create View
-v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3`
AS select weekday(`t1`.`date`) AS `WEEKDAY(date)` from `t1`
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v3` AS select weekday(`test`.`t1`.`date`) AS `WEEKDAY(date)` from `test`.`t1`
SELECT DAYNAME('2005-09-06');
DAYNAME('2005-09-06')
Tuesday
--- 1.28/mysql-test/r/sql_mode.result 2005-09-14 11:24:10 +02:00
+++ 1.29/mysql-test/r/sql_mode.result 2005-10-25 10:29:28 +02:00
@@ -449,11 +449,11 @@
create view v1 as select a from t1;
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select `t1`.`a` AS `a` from `t1`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`
SET @@SQL_MODE='ANSI_QUOTES';
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER="root"@"localhost" SQL SECURITY DEFINER VIEW "v1"
AS select "t1"."a" AS "a" from "t1"
+v1 CREATE ALGORITHM=UNDEFINED DEFINER="root"@"localhost" SQL SECURITY DEFINER VIEW
"test"."v1" AS select "test"."t1"."a" AS "a" from "test"."t1"
create view v2 as select a from t2 where a in (select a from v1);
drop view v2, v1;
drop table t1, t2;
--- 1.21/mysql-test/r/func_in.result 2005-09-14 11:24:10 +02:00
+++ 1.22/mysql-test/r/func_in.result 2005-10-25 10:29:28 +02:00
@@ -209,7 +209,7 @@
CREATE VIEW v1 AS SELECT * FROM t1 WHERE a NOT IN (45);
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select `t1`.`a` AS `a` from `t1` where (`t1`.`a` <> 45)
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a`
<> 45)
SELECT * FROM v1;
a
44
--- 1.18/mysql-test/r/temp_table.result 2005-09-14 11:24:10 +02:00
+++ 1.19/mysql-test/r/temp_table.result 2005-10-25 10:29:28 +02:00
@@ -111,7 +111,7 @@
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create view t1;
View Create View
-t1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `t1`
AS select _latin1'This is view' AS `A`
+t1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`t1` AS select _latin1'This is view' AS `A`
drop view t1;
select * from t1;
A
--- 1.71/mysql-test/r/mysqldump.result 2005-09-14 11:24:10 +02:00
+++ 1.72/mysql-test/r/mysqldump.result 2005-10-25 10:29:28 +02:00
@@ -1397,7 +1397,7 @@
) ENGINE=MyISAM DEFAULT CHARSET=latin1*/;
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
-/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`v2` AS select `t2`.`a` AS `a` from `t2` where (`t2`.`a` like _latin1'a%') WITH CASCADED
CHECK OPTION*/;
+/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`db1`.`v2` AS select `db1`.`t2`.`a` AS `a` from `db1`.`t2` where (`db1`.`t2`.`a` like
_latin1'a%') WITH CASCADED CHECK OPTION*/;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
@@ -1410,33 +1410,6 @@
drop table t2;
drop view v2;
drop database db1;
-create database db2;
-use db2;
-create table t1 (a int);
-create table t2 (a int, b varchar(10), primary key(a));
-insert into t2 values (1, "on"), (2, "off"), (10, "pol"), (12, "meg");
-insert into t1 values (289), (298), (234), (456), (789);
-create view v1 as select * from t2;
-create view v2 as select * from t1;
-drop table t1, t2;
-drop view v1, v2;
-drop database db2;
-create database db1;
-use db1;
-show tables;
-Tables_in_db1
-t1
-t2
-v1
-v2
-select * from t2 order by a;
-a b
-1 on
-2 off
-10 pol
-12 meg
-drop table t1, t2;
-drop database db1;
CREATE DATABASE mysqldump_test_db;
USE mysqldump_test_db;
CREATE TABLE t1 ( a INT );
@@ -1631,7 +1604,7 @@
) ENGINE=MyISAM DEFAULT CHARSET=latin1*/;
/*!50001 DROP TABLE IF EXISTS `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
-/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`v1` AS select `t1`.`a` AS `a` from `t1`*/;
+/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`*/;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
@@ -1683,7 +1656,7 @@
) ENGINE=MyISAM DEFAULT CHARSET=latin1*/;
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
-/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`v2` AS select `t2`.`a` AS `a` from `t2` where (`t2`.`a` like _latin1'a%') WITH CASCADED
CHECK OPTION*/;
+/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`mysqldump_test_db`.`v2` AS select `mysqldump_test_db`.`t2`.`a` AS `a` from
`mysqldump_test_db`.`t2` where (`mysqldump_test_db`.`t2`.`a` like _latin1'a%') WITH
CASCADED CHECK OPTION*/;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
@@ -1747,7 +1720,7 @@
v3 VIEW
show create view v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select `v3`.`a` AS `a`,`v3`.`b` AS `b`,`v3`.`c` AS `c` from `v3` where (`v3`.`b` in
(1,2,3,4,5,6,7))
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW
`test`.`v1` AS select `v3`.`a` AS `a`,`v3`.`b` AS `b`,`v3`.`c` AS `c` from `test`.`v3`
where (`v3`.`b` in (1,2,3,4,5,6,7))
select * from v1;
a b c
1 2 one
--- 1.65/mysql-test/t/mysqldump.test 2005-09-15 21:17:37 +02:00
+++ 1.66/mysql-test/t/mysqldump.test 2005-10-25 10:29:29 +02:00
@@ -573,39 +573,6 @@
drop database db1;
#
-# Bug 10713 mysqldump includes database in create view and referenced tables
-#
-
-# create table and views in db2
-create database db2;
-use db2;
-create table t1 (a int);
-create table t2 (a int, b varchar(10), primary key(a));
-insert into t2 values (1, "on"), (2, "off"), (10, "pol"), (12, "meg");
-insert into t1 values (289), (298), (234), (456), (789);
-create view v1 as select * from t2;
-create view v2 as select * from t1;
-
-# dump tables and view from db2
---exec $MYSQL_DUMP db2 > var/tmp/bug10713.sql
-
-# drop the db, tables and views
-drop table t1, t2;
-drop view v1, v2;
-drop database db2;
-
-# create db1 and reload dump
-create database db1;
-use db1;
---exec $MYSQL db1 < var/tmp/bug10713.sql
-
-# check that all tables and views could be created
-show tables;
-select * from t2 order by a;
-
-drop table t1, t2;
-drop database db1;
-#
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
#
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.1970) BUG#10713 | msvensson | 25 Oct |