diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/partition_csv.result | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/partition_csv.result')
-rw-r--r-- | mysql-test/main/partition_csv.result | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/mysql-test/main/partition_csv.result b/mysql-test/main/partition_csv.result new file mode 100644 index 00000000..836c4968 --- /dev/null +++ b/mysql-test/main/partition_csv.result @@ -0,0 +1,58 @@ +call mtr.add_suppression("Failed to write to mysql.general_log"); +drop table if exists t1; +create table t1 (a int) +engine = csv +partition by list (a) +(partition p0 values in (null)); +ERROR HY000: Engine cannot be used in partitioned tables +USE mysql; +TRUNCATE TABLE general_log; +SET @old_general_log_state = @@global.general_log; +SET GLOBAL general_log = 0; +ALTER TABLE general_log ENGINE = MyISAM; +ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time)) +(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000)); +ERROR HY000: Incorrect usage of PARTITION and log table +ALTER TABLE general_log ENGINE = CSV; +SET GLOBAL general_log = @old_general_log_state; +use test; +# +# Bug#40281: partitioning the general log table crashes the server +# +# set up partitioned log, and switch to it +USE mysql; +SET @old_general_log_state = @@global.general_log; +SET GLOBAL general_log = 0; +CREATE TABLE gl_partitioned LIKE general_log; +ALTER TABLE gl_partitioned ENGINE=myisam; +ALTER TABLE gl_partitioned PARTITION BY HASH (thread_id) PARTITIONS 10; +ALTER TABLE general_log RENAME TO gl_nonpartitioned; +ALTER TABLE gl_partitioned RENAME TO general_log; +SELECT @@global.log_output INTO @old_glo; +SET GLOBAL log_output='table'; +SET GLOBAL general_log =1; +# do some things to be logged to partitioned log, should fail +USE /* 1 */ test; +CREATE TABLE t1 (i INT); +connect con1,localhost,root,,; +INSERT INTO t1 VALUES (1); +SELECT * FROM t1; +i +1 +disconnect con1; +connection default; +USE mysql; +SET GLOBAL general_log =0; +ALTER TABLE general_log RENAME TO gl_partitioned; +ALTER TABLE gl_nonpartitioned RENAME TO general_log; +# show whether we actually logged anything (no) to general_log +SELECT COUNT(argument) FROM gl_partitioned; +COUNT(argument) +0 +DROP TABLE gl_partitioned; +SET GLOBAL log_output = @old_glo; +SET GLOBAL general_log = 1; +USE /* 2 */ test; +DROP TABLE t1; +SET GLOBAL general_log = @old_general_log_state; +End of 5.1 tests |