~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/r/partition_csv.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
call mtr.add_suppression("Failed to write to mysql.general_log");
 
2
drop table if exists t1;
 
3
create table t1 (a int)
 
4
engine = csv
 
5
partition by list (a)
 
6
(partition p0 values in (null));
 
7
ERROR HY000: Engine cannot be used in partitioned tables
 
8
USE mysql;
 
9
TRUNCATE TABLE general_log;
 
10
SET @old_general_log_state = @@global.general_log;
 
11
SET GLOBAL general_log = 0;
 
12
ALTER TABLE general_log ENGINE = MyISAM;
 
13
ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
 
14
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
 
15
ERROR HY000: Incorrect usage of PARTITION and log table
 
16
ALTER TABLE general_log ENGINE = CSV;
 
17
SET GLOBAL general_log = @old_general_log_state;
 
18
use test;
 
19
#
 
20
# Bug#40281: partitioning the general log table crashes the server
 
21
#
 
22
# set up partitioned log, and switch to it
 
23
USE mysql;
 
24
SET @old_general_log_state = @@global.general_log;
 
25
SET GLOBAL general_log = 0;
 
26
CREATE TABLE gl_partitioned LIKE general_log;
 
27
ALTER TABLE gl_partitioned ENGINE=myisam;
 
28
ALTER TABLE gl_partitioned PARTITION BY HASH (thread_id) PARTITIONS 10;
 
29
ALTER TABLE general_log RENAME TO gl_nonpartitioned;
 
30
ALTER TABLE gl_partitioned RENAME TO general_log;
 
31
SELECT @@global.log_output INTO @old_glo;
 
32
SET GLOBAL log_output='table';
 
33
SET GLOBAL general_log =1;
 
34
# do some things to be logged to partitioned log, should fail
 
35
USE /* 1 */ test;
 
36
CREATE TABLE t1 (i INT);
 
37
INSERT INTO t1 VALUES (1);
 
38
SELECT * FROM t1;
 
39
i
 
40
1
 
41
USE mysql;
 
42
SET GLOBAL general_log =0;
 
43
ALTER TABLE general_log RENAME TO gl_partitioned;
 
44
ALTER TABLE gl_nonpartitioned RENAME TO general_log;
 
45
# show whether we actually logged anything (no) to general_log
 
46
SELECT COUNT(argument) FROM gl_partitioned;
 
47
COUNT(argument)
 
48
0
 
49
DROP TABLE gl_partitioned;
 
50
SET GLOBAL log_output = @old_glo;
 
51
SET GLOBAL general_log = 1;
 
52
USE /* 2 */ test;
 
53
DROP TABLE t1;
 
54
SET GLOBAL general_log = @old_general_log_state;
 
55
End of 5.1 tests