summaryrefslogtreecommitdiff
path: root/mysql-test/main/create_select_tmp.result
blob: 2842ab26c4250070fae2a0b07aa06917c2656f1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
drop table if exists t1, t2;
CREATE TABLE t1 ( a int );
INSERT INTO t1 VALUES (1),(2),(1);
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;
set sql_mode='ignore_bad_table_options';
create table t1 (
f1 int invisible,
f2 int comment 'a comment',
f3 int foo="bar",
f4 int check(f4 < 10),
f5 int without system versioning
) with system versioning as select 1 as f1,2 as f2,3 as f3,4 as f4,5 as f5;
Warnings:
Warning	1911	Unknown option 'foo'
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `f1` int(11) INVISIBLE DEFAULT NULL,
  `f2` int(11) DEFAULT NULL COMMENT 'a comment',
  `f3` int(11) DEFAULT NULL `foo`='bar',
  `f4` int(11) DEFAULT NULL CHECK (`f4` < 10),
  `f5` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
drop table t1;
set sql_mode=default;