mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / r / error_simulation.result
blobf1835186787bd6fe497636758b48894d4bd2e603
1 DROP TABLE IF EXISTS t1;
2 Warnings:
3 Note    1051    Unknown table 't1'
4 CREATE TABLE t1 (
5 a varchar(32) character set utf8 collate utf8_bin NOT NULL,
6 b varchar(32) character set utf8 collate utf8_bin NOT NULL )
7 ENGINE=MyISAM DEFAULT CHARSET=utf8;
8 INSERT INTO t1 VALUES
9 ('AAAAAAAAAA','AAAAAAAAAA'), ('AAAAAAAAAB','AAAAAAAAAB '),
10 ('AAAAAAAAAB','AAAAAAAAAB'), ('AAAAAAAAAC','AAAAAAAAAC'),
11 ('AAAAAAAAAD','AAAAAAAAAD'), ('AAAAAAAAAE','AAAAAAAAAE'),
12 ('AAAAAAAAAF','AAAAAAAAAF'), ('AAAAAAAAAG','AAAAAAAAAG'),
13 ('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
14 ('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
15 set tmp_table_size=1024;
16 set session debug="d,raise_error";
17 SELECT MAX(a) FROM t1 GROUP BY a,b;
18 ERROR 23000: Can't write; duplicate key in table 'tmp_table'
19 set tmp_table_size=default;
20 DROP TABLE t1;
22 # Bug #50946: fast index creation still seems to copy the table
24 CREATE TABLE t1 (a INT(100) NOT NULL);
25 INSERT INTO t1 VALUES (1), (0), (2);
26 SET SESSION debug='+d,alter_table_only_index_change';
27 ALTER TABLE t1 ADD INDEX a(a);
28 SET SESSION debug=DEFAULT;
29 SHOW CREATE TABLE t1;
30 Table   Create Table
31 t1      CREATE TABLE `t1` (
32   `a` int(100) NOT NULL,
33   KEY `a` (`a`)
34 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
35 SELECT * FROM t1;
40 DROP TABLE t1;
42 # Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string
44 CREATE TABLE t1(a BLOB);
45 SET SESSION debug="+d,bug42064_simulate_oom";
46 INSERT INTO t1 VALUES("");
47 Got one of the listed errors
48 SET SESSION debug=DEFAULT;
49 DROP TABLE t1;
51 # Bug#41660: Sort-index_merge for non-first join table may require 
52 # O(#scans) memory
54 CREATE TABLE t1 (a INT);
55 INSERT INTO t1 VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
56 CREATE TABLE t2 (a INT, b INT, filler CHAR(100), KEY(a), KEY(b));
57 INSERT INTO t2 SELECT 1000, 1000, 'filler' FROM t1 A, t1 B, t1 C;
58 INSERT INTO t2 VALUES (1, 1, 'data');
59 # the example query uses LEFT JOIN only for the sake of being able to
60 # demonstrate the issue with a very small dataset. (left outer join 
61 # disables the use of join buffering, so we get the second table 
62 # re-scanned for every record in the outer table. if we used inner join,
63 # we would need to have thousands of records and/or more columns in both
64 # tables so that the join buffer is filled and re-scans are triggered).
65 SET SESSION debug = '+d,only_one_Unique_may_be_created';
66 EXPLAIN
67 SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
68 id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
69 x       x       x       x       x       x       x       x       x       
70 x       x       x       x       x       x       x       x       x       Using sort_union(a,b); Using where
71 SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
72 a       a       b       filler
73 0       1       1       data
74 1       1       1       data
75 2       1       1       data
76 3       1       1       data
77 4       1       1       data
78 5       1       1       data
79 6       1       1       data
80 7       1       1       data
81 8       1       1       data
82 9       1       1       data
83 SET SESSION debug = DEFAULT;
84 DROP TABLE t1, t2;
86 # Bug#11747970 34660: CRASH WHEN FEDERATED TABLE LOSES CONNECTION DURING INSERT ... SELECT
88 CREATE TABLE t1(f1 INT, KEY(f1));
89 CREATE TABLE t2(f1 INT);
90 INSERT INTO t1 VALUES (1),(2);
91 INSERT INTO t2 VALUES (1),(2);
92 SET SESSION debug='d,bug11747970_simulate_error';
93 INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1);
94 Warnings:
95 Error   1105    Unknown error
96 SET SESSION debug = DEFAULT;
97 DROP TABLE t1,t2;
99 # End of 5.1 tests