diff options
author | unknown <msvensson@pilot.mysql.com> | 2008-04-03 11:50:43 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.mysql.com> | 2008-04-03 11:50:43 +0200 |
commit | 2b0abf767645ec2f589fd040b7d4dcc6518f7d09 (patch) | |
tree | abcc5a4053c601e7cce25995bc6169db4e48d8c2 /mysql-test/r/view.result | |
parent | 3b8d2707297ad4aa280fb59e0196b1e664a7ec62 (diff) | |
parent | 32bf1f60b770320e0d0ba2e25b5cd193ab482316 (diff) | |
download | mariadb-git-2b0abf767645ec2f589fd040b7d4dcc6518f7d09.tar.gz |
Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-rpl_row_charset.test:
Auto merged
CMakeLists.txt:
Auto merged
configure.in:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
Auto merged
mysql-test/include/commit.inc:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/lib/mtr_report.pm:
Auto merged
mysql-test/r/commit_1innodb.result:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/ctype_big5.result:
Auto merged
mysql-test/r/drop.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/loaddata.result:
Auto merged
mysql-test/r/mysqlbinlog.result:
Auto merged
mysql-test/r/partition_error.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
Auto merged
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
Auto merged
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
Auto merged
mysql-test/suite/binlog/r/binlog_unsafe.result:
Auto merged
mysql-test/suite/binlog/t/binlog_unsafe.test:
Auto merged
mysql-test/suite/federated/federated.result:
Auto merged
mysql-test/suite/federated/federated.test:
Auto merged
mysql-test/suite/parts/r/partition_alter1_myisam.result:
Auto merged
mysql-test/suite/parts/r/partition_alter2_myisam.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_log.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
Auto merged
mysql-test/suite/rpl/t/disabled.def:
Auto merged
mysql-test/suite/rpl/t/rpl_flushlog_loop.test:
Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/csv.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/distinct.test:
Auto merged
mysql-test/t/drop.test:
Auto merged
mysql-test/t/group_by.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/loaddata.test:
Auto merged
mysql-test/t/partition_error.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view.test:
Auto merged
mysql-test/t/warnings.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
BitKeeper/deleted/.del-combinations:
Delete: mysql-test/suite/binlog/combinations
mysql-test/r/partition_not_windows.result:
Use remote
mysql-test/r/partition_symlink.result:
Use remote
mysql-test/r/symlink.result:
SCCS merged
mysql-test/suite/parts/inc/partition_basic.inc:
SCCS merged
mysql-test/suite/parts/inc/partition_check_drop.inc:
Use remote
mysql-test/suite/parts/inc/partition_layout_check1.inc:
Use remote
mysql-test/suite/parts/inc/partition_layout_check2.inc:
Use remote
mysql-test/suite/parts/r/partition_basic_innodb.result:
Use remote
mysql-test/suite/parts/r/partition_basic_myisam.result:
Use remote
mysql-test/suite/parts/r/partition_engine_myisam.result:
Use remote
mysql-test/suite/parts/t/partition_sessions.test:
SCCS merged
mysql-test/t/partition.test:
SCCS merged
mysql-test/t/partition_not_windows.test:
Use remote
mysql-test/t/partition_symlink.test:
Use remote
mysql-test/t/symlink.test:
Use remote
mysql-test/suite/binlog/r/binlog_multi_engine.result:
Manual merge, name of binlog file changed
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
Manual merge
mysys/my_init.c:
Manual merge
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r-- | mysql-test/r/view.result | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 3a7519cdcf1..9bea52ef769 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3613,6 +3613,30 @@ ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default val set @@sql_mode=@old_mode; drop view v1; drop table t1; +create table t1 (a int, key(a)); +create table t2 (c int); +create view v1 as select a b from t1; +create view v2 as select 1 a from t2, v1 where c in +(select 1 from t1 where b = a); +insert into t1 values (1), (1); +insert into t2 values (1), (1); +prepare stmt from "select * from v2 where a = 1"; +execute stmt; +a +1 +1 +1 +1 +drop view v1, v2; +drop table t1, t2; +CREATE TABLE t1 (a INT); +CREATE VIEW v1 AS SELECT p.a AS a FROM t1 p, t1 q; +INSERT INTO t1 VALUES (1), (1); +SELECT MAX(a), COUNT(DISTINCT a) FROM v1 GROUP BY a; +MAX(a) COUNT(DISTINCT a) +1 1 +DROP VIEW v1; +DROP TABLE t1; # ----------------------------------------------------------------- # -- Bug#34337: Server crash when Altering a view using a table name. # ----------------------------------------------------------------- @@ -3631,6 +3655,24 @@ DROP TABLE t1; # -- End of test case for Bug#34337. # ----------------------------------------------------------------- +# -- Bug#35193: VIEW query is rewritten without "FROM DUAL", +# -- causing syntax error +# ----------------------------------------------------------------- + +CREATE VIEW v1 AS SELECT 1 FROM DUAL WHERE 1; + +SELECT * FROM v1; +1 +1 +SHOW CREATE TABLE v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` from DUAL where 1 latin1 latin1_swedish_ci + +DROP VIEW v1; + +# -- End of test case for Bug#35193. + +# ----------------------------------------------------------------- # -- End of 5.0 tests. # ----------------------------------------------------------------- DROP DATABASE IF EXISTS `d-1`; |