Loading mysql-test/r/csv_alter_table.result 0 → 100644 +40 −0 Original line number Diff line number Diff line # ===== csv_alter_table.1 ===== DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; ALTER TABLE t1 ADD COLUMN b CHAR(5) NOT NULL; DESC t1; Field Type Null Key Default Extra a int(11) NO NULL b char(5) NO NULL ALTER TABLE t1 DROP COLUMN b; DESC t1; Field Type Null Key Default Extra a int(11) NO NULL ALTER TABLE t1 MODIFY a BIGINT NOT NULL; DESC t1; Field Type Null Key Default Extra a bigint(20) NO NULL ALTER TABLE t1 CHANGE a a INT NOT NULL; DESC t1; Field Type Null Key Default Extra a int(11) NO NULL DROP TABLE t1; # ===== csv_alter_table.2 ===== DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; ALTER TABLE t1 ADD COLUMN b CHAR(5); ERROR 42000: The storage engine for the table doesn't support nullable columns DESC t1; Field Type Null Key Default Extra a int(11) NO NULL ALTER TABLE t1 MODIFY a BIGINT; ERROR 42000: The storage engine for the table doesn't support nullable columns DESC t1; Field Type Null Key Default Extra a int(11) NO NULL ALTER TABLE t1 CHANGE a a INT; ERROR 42000: The storage engine for the table doesn't support nullable columns DESC t1; Field Type Null Key Default Extra a int(11) NO NULL DROP TABLE t1; mysql-test/r/events_scheduling.result +5 −4 Original line number Diff line number Diff line CREATE DATABASE IF NOT EXISTS events_test; USE events_test; SET @event_scheduler=@@global.event_scheduler; SET GLOBAL event_scheduler=OFF; Try agian to make sure it's allowed Try again to make sure it's allowed SET GLOBAL event_scheduler=OFF; SHOW VARIABLES LIKE 'event_scheduler'; Variable_name Value Loading Loading @@ -64,8 +65,8 @@ INSERT INTO table_4 VALUES (1); SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; IF(SUM(a) >= 4, 'OK', 'ERROR') OK SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2; IF(SUM(a) >= 5, 'OK', 'ERROR') SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_2; IF(SUM(a) >= 4, 'OK', 'ERROR') OK SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; IF(SUM(a) >= 1, 'OK', 'ERROR') Loading Loading @@ -94,4 +95,4 @@ DROP TABLE table_2; DROP TABLE table_3; DROP TABLE table_4; DROP DATABASE events_test; SET GLOBAL event_scheduler=OFF; SET GLOBAL event_scheduler=@event_scheduler; mysql-test/r/events_time_zone.result +7 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ RETURN FLOOR((i % (step * n) + 0.1) / step); END// SET @step3= @step * 3; SET @step6= @step * 6; SET @unix_time= UNIX_TIMESTAMP() - 1; SET @unix_time= @unix_time - @unix_time % @step6; INSERT INTO mysql.time_zone VALUES (NULL, 'N'); SET @tzid= LAST_INSERT_ID(); Loading @@ -21,7 +22,7 @@ INSERT INTO mysql.time_zone_transition_type VALUES (@tzid, 0, 0, 0, 'b16420_0'); INSERT INTO mysql.time_zone_transition_type VALUES (@tzid, 1, @step3 - @step, 1, 'b16420_1'); INSERT INTO mysql.time_zone_name VALUES ('bug16420', @tzid); INSERT INTO mysql.time_zone_name VALUES ('<TZ_NAME_1>', @tzid); CREATE TABLE t1 (count INT, unix_time INT, local_time INT, comment CHAR(80)); CREATE TABLE t2 (count INT); INSERT INTO t2 VALUES (1); Loading @@ -48,7 +49,7 @@ END// SET TIME_ZONE= '+00:00'; CREATE EVENT e1 ON SCHEDULE EVERY @step SECOND STARTS FROM_UNIXTIME(@unix_time) DO SELECT f1("<e1>"); SET TIME_ZONE= 'bug16420'; SET TIME_ZONE= '<TZ_NAME_1>'; CREATE EVENT e2 ON SCHEDULE EVERY @step SECOND STARTS FROM_UNIXTIME(@unix_time) DO SELECT f1("<e2>"); SET GLOBAL EVENT_SCHEDULER= ON; Loading Loading @@ -86,6 +87,7 @@ DELETE FROM mysql.time_zone_name WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone_transition_type WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone_transition WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone WHERE time_zone_id = @tzid; ALTER TABLE mysql.time_zone AUTO_INCREMENT = 6; SET TIME_ZONE= '+00:00'; CREATE TABLE t1 (event CHAR(2), dt DATE, offset INT); INSERT INTO mysql.time_zone VALUES (NULL, 'N'); Loading @@ -111,8 +113,8 @@ INSERT INTO mysql.time_zone_transition VALUES (@tzid, @now + 7 * @step, 2); INSERT INTO mysql.time_zone_transition VALUES (@tzid, @now + 12 * @step, 3); INSERT INTO mysql.time_zone_name VALUES ('bug16420_2', @tzid); SET TIME_ZONE= 'bug16420_2'; INSERT INTO mysql.time_zone_name VALUES ('<TZ_NAME_2>', @tzid); SET TIME_ZONE= '<TZ_NAME_2>'; SET GLOBAL EVENT_SCHEDULER= ON; SET GLOBAL EVENT_SCHEDULER= OFF; Below we should see the following: Loading Loading @@ -143,6 +145,7 @@ DELETE FROM mysql.time_zone_name WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone_transition_type WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone_transition WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone WHERE time_zone_id = @tzid; ALTER TABLE mysql.time_zone AUTO_INCREMENT = 6; DROP FUNCTION round_to_step; DROP TABLE t_step; DROP DATABASE mysqltest_db1; Loading mysql-test/r/group_concat_max_len_func.result +42 −32 Original line number Diff line number Diff line SET @save = @@global.group_concat_max_len; drop table if exists t1; DROP TABLE IF EXISTS t1; ## Creating new table t1 ## CREATE TABLE t1 ( id INT NOT NULL auto_increment, id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), rollno int NOT NULL, rollno INT NOT NULL, name VARCHAR(30) ); '#--------------------FN_DYNVARS_034_01-------------------------#' ## Setting initial value of variable to 4 ## SET @@global.group_concat_max_len = 4; ## Inserting some rows in table ## INSERT into t1(rollno, name) values(1, 'Record_1'); INSERT into t1(rollno, name) values(2, 'Record_2'); INSERT into t1(rollno, name) values(1, 'Record_3'); INSERT into t1(rollno, name) values(3, 'Record_4'); INSERT into t1(rollno, name) values(1, 'Record_5'); INSERT into t1(rollno, name) values(3, 'Record_6'); INSERT into t1(rollno, name) values(4, 'Record_7'); INSERT into t1(rollno, name) values(4, 'Record_8'); INSERT INTO t1(rollno, name) VALUES(1, 'Record_1'); INSERT INTO t1(rollno, name) VALUES(2, 'Record_2'); INSERT INTO t1(rollno, name) VALUES(1, 'Record_3'); INSERT INTO t1(rollno, name) VALUES(3, 'Record_4'); INSERT INTO t1(rollno, name) VALUES(1, 'Record_5'); INSERT INTO t1(rollno, name) VALUES(3, 'Record_6'); INSERT INTO t1(rollno, name) VALUES(4, 'Record_7'); INSERT INTO t1(rollno, name) VALUES(4, 'Record_8'); SELECT * FROM t1 ORDER BY id; id rollno name 1 1 Record_1 2 2 Record_2 3 1 Record_3 4 3 Record_4 5 1 Record_5 6 3 Record_6 7 4 Record_7 8 4 Record_8 ## Creating two new connections ## '#--------------------FN_DYNVARS_034_02-------------------------#' ## Connecting with test_con1 ## ## Accessing data and using group_concat on column whose value is greater than 4 ## SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno; id rollno group_concat(name) SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; id rollno GROUP_CONCAT(name) 1 1 Reco 2 2 Reco 4 3 Reco Loading @@ -35,8 +45,8 @@ Warning 1260 4 line(s) were cut by GROUP_CONCAT() ## Changing session value of variable and verifying its behavior, ## ## warning should come here ## SET @@session.group_concat_max_len = 10; SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno; id rollno group_concat(name) SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; id rollno GROUP_CONCAT(name) 1 1 Record_1,R 2 2 Record_2 4 3 Record_4,R Loading @@ -54,8 +64,8 @@ SELECT @@session.group_concat_max_len = 4; SET @@session.group_concat_max_len = 20; ## Verifying value of name column, it should not me more than 20 characters ## ## Warning should come here ## SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno; id rollno group_concat(name) SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; id rollno GROUP_CONCAT(name) 1 1 Record_1,Record_3,Re 2 2 Record_2 4 3 Record_4,Record_6 Loading @@ -67,13 +77,13 @@ Warning 1260 1 line(s) were cut by GROUP_CONCAT() ## because the value after concatination is less than 30 ## SET @@session.group_concat_max_len = 26; ## Verifying value of name column, it should not give warning now ## SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno; id rollno group_concat(name) SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; id rollno GROUP_CONCAT(name) 1 1 Record_1,Record_3,Record_5 2 2 Record_2 4 3 Record_4,Record_6 7 4 Record_7,Record_8 ## Dropping table t1 ## DROP table t1; DROP TABLE t1; ## Disconnecting both the connection ## SET @@global.group_concat_max_len = @save; mysql-test/r/multi_update.result +0 −23 Original line number Diff line number Diff line Loading @@ -378,29 +378,6 @@ where 0=1; delete t1, t2 from t2,t1 where t1.id1=t2.id2 and 0=1; drop table t1,t2; create table t1 ( a int not null, b int not null) ; alter table t1 add index i1(a); delete from t1 where a > 2000000; create table t2 like t1; insert into t2 select * from t1; select 't2 rows before small delete', count(*) from t1; t2 rows before small delete count(*) t2 rows before small delete 2000000 delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 2; select 't2 rows after small delete', count(*) from t2; t2 rows after small delete count(*) t2 rows after small delete 1999999 select 't1 rows after small delete', count(*) from t1; t1 rows after small delete count(*) t1 rows after small delete 1999999 delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 100*1000; select 't2 rows after big delete', count(*) from t2; t2 rows after big delete count(*) t2 rows after big delete 1900001 select 't1 rows after big delete', count(*) from t1; t1 rows after big delete count(*) t1 rows after big delete 1900001 drop table t1,t2; CREATE TABLE t1 ( a int ); CREATE TABLE t2 ( a int ); DELETE t1 FROM t1, t2 AS t3; Loading Loading
mysql-test/r/csv_alter_table.result 0 → 100644 +40 −0 Original line number Diff line number Diff line # ===== csv_alter_table.1 ===== DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; ALTER TABLE t1 ADD COLUMN b CHAR(5) NOT NULL; DESC t1; Field Type Null Key Default Extra a int(11) NO NULL b char(5) NO NULL ALTER TABLE t1 DROP COLUMN b; DESC t1; Field Type Null Key Default Extra a int(11) NO NULL ALTER TABLE t1 MODIFY a BIGINT NOT NULL; DESC t1; Field Type Null Key Default Extra a bigint(20) NO NULL ALTER TABLE t1 CHANGE a a INT NOT NULL; DESC t1; Field Type Null Key Default Extra a int(11) NO NULL DROP TABLE t1; # ===== csv_alter_table.2 ===== DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; ALTER TABLE t1 ADD COLUMN b CHAR(5); ERROR 42000: The storage engine for the table doesn't support nullable columns DESC t1; Field Type Null Key Default Extra a int(11) NO NULL ALTER TABLE t1 MODIFY a BIGINT; ERROR 42000: The storage engine for the table doesn't support nullable columns DESC t1; Field Type Null Key Default Extra a int(11) NO NULL ALTER TABLE t1 CHANGE a a INT; ERROR 42000: The storage engine for the table doesn't support nullable columns DESC t1; Field Type Null Key Default Extra a int(11) NO NULL DROP TABLE t1;
mysql-test/r/events_scheduling.result +5 −4 Original line number Diff line number Diff line CREATE DATABASE IF NOT EXISTS events_test; USE events_test; SET @event_scheduler=@@global.event_scheduler; SET GLOBAL event_scheduler=OFF; Try agian to make sure it's allowed Try again to make sure it's allowed SET GLOBAL event_scheduler=OFF; SHOW VARIABLES LIKE 'event_scheduler'; Variable_name Value Loading Loading @@ -64,8 +65,8 @@ INSERT INTO table_4 VALUES (1); SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; IF(SUM(a) >= 4, 'OK', 'ERROR') OK SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2; IF(SUM(a) >= 5, 'OK', 'ERROR') SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_2; IF(SUM(a) >= 4, 'OK', 'ERROR') OK SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; IF(SUM(a) >= 1, 'OK', 'ERROR') Loading Loading @@ -94,4 +95,4 @@ DROP TABLE table_2; DROP TABLE table_3; DROP TABLE table_4; DROP DATABASE events_test; SET GLOBAL event_scheduler=OFF; SET GLOBAL event_scheduler=@event_scheduler;
mysql-test/r/events_time_zone.result +7 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ RETURN FLOOR((i % (step * n) + 0.1) / step); END// SET @step3= @step * 3; SET @step6= @step * 6; SET @unix_time= UNIX_TIMESTAMP() - 1; SET @unix_time= @unix_time - @unix_time % @step6; INSERT INTO mysql.time_zone VALUES (NULL, 'N'); SET @tzid= LAST_INSERT_ID(); Loading @@ -21,7 +22,7 @@ INSERT INTO mysql.time_zone_transition_type VALUES (@tzid, 0, 0, 0, 'b16420_0'); INSERT INTO mysql.time_zone_transition_type VALUES (@tzid, 1, @step3 - @step, 1, 'b16420_1'); INSERT INTO mysql.time_zone_name VALUES ('bug16420', @tzid); INSERT INTO mysql.time_zone_name VALUES ('<TZ_NAME_1>', @tzid); CREATE TABLE t1 (count INT, unix_time INT, local_time INT, comment CHAR(80)); CREATE TABLE t2 (count INT); INSERT INTO t2 VALUES (1); Loading @@ -48,7 +49,7 @@ END// SET TIME_ZONE= '+00:00'; CREATE EVENT e1 ON SCHEDULE EVERY @step SECOND STARTS FROM_UNIXTIME(@unix_time) DO SELECT f1("<e1>"); SET TIME_ZONE= 'bug16420'; SET TIME_ZONE= '<TZ_NAME_1>'; CREATE EVENT e2 ON SCHEDULE EVERY @step SECOND STARTS FROM_UNIXTIME(@unix_time) DO SELECT f1("<e2>"); SET GLOBAL EVENT_SCHEDULER= ON; Loading Loading @@ -86,6 +87,7 @@ DELETE FROM mysql.time_zone_name WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone_transition_type WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone_transition WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone WHERE time_zone_id = @tzid; ALTER TABLE mysql.time_zone AUTO_INCREMENT = 6; SET TIME_ZONE= '+00:00'; CREATE TABLE t1 (event CHAR(2), dt DATE, offset INT); INSERT INTO mysql.time_zone VALUES (NULL, 'N'); Loading @@ -111,8 +113,8 @@ INSERT INTO mysql.time_zone_transition VALUES (@tzid, @now + 7 * @step, 2); INSERT INTO mysql.time_zone_transition VALUES (@tzid, @now + 12 * @step, 3); INSERT INTO mysql.time_zone_name VALUES ('bug16420_2', @tzid); SET TIME_ZONE= 'bug16420_2'; INSERT INTO mysql.time_zone_name VALUES ('<TZ_NAME_2>', @tzid); SET TIME_ZONE= '<TZ_NAME_2>'; SET GLOBAL EVENT_SCHEDULER= ON; SET GLOBAL EVENT_SCHEDULER= OFF; Below we should see the following: Loading Loading @@ -143,6 +145,7 @@ DELETE FROM mysql.time_zone_name WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone_transition_type WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone_transition WHERE time_zone_id = @tzid; DELETE FROM mysql.time_zone WHERE time_zone_id = @tzid; ALTER TABLE mysql.time_zone AUTO_INCREMENT = 6; DROP FUNCTION round_to_step; DROP TABLE t_step; DROP DATABASE mysqltest_db1; Loading
mysql-test/r/group_concat_max_len_func.result +42 −32 Original line number Diff line number Diff line SET @save = @@global.group_concat_max_len; drop table if exists t1; DROP TABLE IF EXISTS t1; ## Creating new table t1 ## CREATE TABLE t1 ( id INT NOT NULL auto_increment, id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), rollno int NOT NULL, rollno INT NOT NULL, name VARCHAR(30) ); '#--------------------FN_DYNVARS_034_01-------------------------#' ## Setting initial value of variable to 4 ## SET @@global.group_concat_max_len = 4; ## Inserting some rows in table ## INSERT into t1(rollno, name) values(1, 'Record_1'); INSERT into t1(rollno, name) values(2, 'Record_2'); INSERT into t1(rollno, name) values(1, 'Record_3'); INSERT into t1(rollno, name) values(3, 'Record_4'); INSERT into t1(rollno, name) values(1, 'Record_5'); INSERT into t1(rollno, name) values(3, 'Record_6'); INSERT into t1(rollno, name) values(4, 'Record_7'); INSERT into t1(rollno, name) values(4, 'Record_8'); INSERT INTO t1(rollno, name) VALUES(1, 'Record_1'); INSERT INTO t1(rollno, name) VALUES(2, 'Record_2'); INSERT INTO t1(rollno, name) VALUES(1, 'Record_3'); INSERT INTO t1(rollno, name) VALUES(3, 'Record_4'); INSERT INTO t1(rollno, name) VALUES(1, 'Record_5'); INSERT INTO t1(rollno, name) VALUES(3, 'Record_6'); INSERT INTO t1(rollno, name) VALUES(4, 'Record_7'); INSERT INTO t1(rollno, name) VALUES(4, 'Record_8'); SELECT * FROM t1 ORDER BY id; id rollno name 1 1 Record_1 2 2 Record_2 3 1 Record_3 4 3 Record_4 5 1 Record_5 6 3 Record_6 7 4 Record_7 8 4 Record_8 ## Creating two new connections ## '#--------------------FN_DYNVARS_034_02-------------------------#' ## Connecting with test_con1 ## ## Accessing data and using group_concat on column whose value is greater than 4 ## SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno; id rollno group_concat(name) SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; id rollno GROUP_CONCAT(name) 1 1 Reco 2 2 Reco 4 3 Reco Loading @@ -35,8 +45,8 @@ Warning 1260 4 line(s) were cut by GROUP_CONCAT() ## Changing session value of variable and verifying its behavior, ## ## warning should come here ## SET @@session.group_concat_max_len = 10; SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno; id rollno group_concat(name) SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; id rollno GROUP_CONCAT(name) 1 1 Record_1,R 2 2 Record_2 4 3 Record_4,R Loading @@ -54,8 +64,8 @@ SELECT @@session.group_concat_max_len = 4; SET @@session.group_concat_max_len = 20; ## Verifying value of name column, it should not me more than 20 characters ## ## Warning should come here ## SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno; id rollno group_concat(name) SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; id rollno GROUP_CONCAT(name) 1 1 Record_1,Record_3,Re 2 2 Record_2 4 3 Record_4,Record_6 Loading @@ -67,13 +77,13 @@ Warning 1260 1 line(s) were cut by GROUP_CONCAT() ## because the value after concatination is less than 30 ## SET @@session.group_concat_max_len = 26; ## Verifying value of name column, it should not give warning now ## SELECT id, rollno, group_concat(name) FROM t1 GROUP BY rollno; id rollno group_concat(name) SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; id rollno GROUP_CONCAT(name) 1 1 Record_1,Record_3,Record_5 2 2 Record_2 4 3 Record_4,Record_6 7 4 Record_7,Record_8 ## Dropping table t1 ## DROP table t1; DROP TABLE t1; ## Disconnecting both the connection ## SET @@global.group_concat_max_len = @save;
mysql-test/r/multi_update.result +0 −23 Original line number Diff line number Diff line Loading @@ -378,29 +378,6 @@ where 0=1; delete t1, t2 from t2,t1 where t1.id1=t2.id2 and 0=1; drop table t1,t2; create table t1 ( a int not null, b int not null) ; alter table t1 add index i1(a); delete from t1 where a > 2000000; create table t2 like t1; insert into t2 select * from t1; select 't2 rows before small delete', count(*) from t1; t2 rows before small delete count(*) t2 rows before small delete 2000000 delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 2; select 't2 rows after small delete', count(*) from t2; t2 rows after small delete count(*) t2 rows after small delete 1999999 select 't1 rows after small delete', count(*) from t1; t1 rows after small delete count(*) t1 rows after small delete 1999999 delete t1,t2 from t1,t2 where t1.b=t2.a and t1.a < 100*1000; select 't2 rows after big delete', count(*) from t2; t2 rows after big delete count(*) t2 rows after big delete 1900001 select 't1 rows after big delete', count(*) from t1; t1 rows after big delete count(*) t1 rows after big delete 1900001 drop table t1,t2; CREATE TABLE t1 ( a int ); CREATE TABLE t2 ( a int ); DELETE t1 FROM t1, t2 AS t3; Loading