~ubuntu-branches/ubuntu/natty/mysql-5.1/natty

« back to all changes in this revision

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

Tags: 5.1.54-1ubuntu1
* Synchronize from Debian Experimental:
* Merge from debian unstable:
  + debian/control:
     * Update maintainer according to spec.
     * Move section from "misc" to "database".
     * Added libmysqlclient16-dev an empty transitional package. 
     * Added mysql-client-core-5.1 package.
     * Suggest mailx for mysql-server-5.1
     * Add mysql-testsuite package so you can run the testsuite seperately.
  + debian/additions/my.cnf:
    * Remove language options. Error message files are located in a different directory in Mysql
      5.0. Setting the language option to use /usr/share/mysql/english breaks Mysql 5.0. Both 5.0
      and 5.1 use a different value that works. (LP: #316974)
  + Add apparmor profile:
    + debian/apparmor-profile: apparmor-profile
    + debian/rules, debian/mysql-server-5.1.files: install apparmor profile
    + debian/mysql-server-5.1.dirs: add etc/apparmor.d/fore-complain
    + debian/mysql-server-5.1.postrm: remove symlink in force-complain/ on purge.
    + debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    + debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    + debian/mysql-server-5.1.postinst: reload apparmor profiles
  * Convert the package from sysvinit to upstart:
    + debian/mysql-server-5.1.mysql.upstart: Add upstart script.
    + debian/mysql-server-5.1.mysql.init: Dropped, unused now with upstart.
    + debian/additions/mysqld_safe_syslog.cnf: Dropped, unused now with upstart.
    + debian/additons/my.cnf: Remove pid declaration and setup error logging to /var/log/mysql since
      we're not piping anything around logger anymore.
    + debian/rules, debian/mysql-server-5.1.logcheck.ignore.{paranoid,worstation},
      debian/mysql-server-5.1.logcheck.ignore.server: : Remove references to mysqld_safe
    + debian/patches/38_scripts_mysqld_safe.sh_signals.dpatch: Dropped
  * Added -fno-strict-aliasing to CFLAGS to get around mysql testsuite build failures.
  * Add Apport hook (LP: #354188):
    + debian/mysql-server-5.1.py: apport package hook
    + debian/rules: Make it installable
  * debian/mysql-server-5.1.mysql-server.logrotate: Check to see if mysql is running before
    running logrotate. (LP: #513135)
  * Make the testsuite installable. (LP: #530752)
    + debian/mysql-server-5.1.files, debian/rules: install apport package hook
  * debian/mysql-server-5.1.preinst: Set mysql user's home directory
    to /nonexistent to protect against having the /var/lib/mysql
    user-writeable. If an attacker can trick mysqld into creating
    dot files in the home directory, he could do .rhost-like attacks
    on the system. (LP: #293258)
  * debian/control: mysql-client-5.1 should depend on mysql-core-client-5.1.
    (LP: #590952)
  * debian/mysql-server.5.1.postinst: Specify the mysql user when installing 
    the mysql databases. (LP: #591875)
  * Installing mysql_config_pic in /usr/bin so users of libmysqld-pic
    can extract the appropriate compile flags. (LP: #605021) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1, t2;
2
2
#
 
3
# Bug#56287: crash when using Partition datetime in sub in query
 
4
#
 
5
CREATE TABLE t1
 
6
(c1 bigint(20) unsigned NOT NULL AUTO_INCREMENT,
 
7
c2 varchar(40) not null default '',
 
8
c3 datetime not  NULL,
 
9
PRIMARY KEY (c1,c3),
 
10
KEY partidx(c3))
 
11
ENGINE=InnoDB
 
12
PARTITION BY RANGE (TO_DAYS(c3))
 
13
(PARTITION p200912 VALUES LESS THAN (to_days('2010-01-01')),
 
14
PARTITION p201103 VALUES LESS THAN (to_days('2011-04-01')),
 
15
PARTITION p201912 VALUES LESS THAN MAXVALUE);
 
16
insert into t1(c2,c3) values ("Test row",'2010-01-01 00:00:00');
 
17
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
 
18
PARTITION_NAME  TABLE_ROWS
 
19
p200912 0
 
20
p201103 1
 
21
p201912 0
 
22
SELECT count(*) FROM t1 p where c3 in
 
23
(select c3 from t1 t where t.c3 < date '2011-04-26 19:19:44'
 
24
 and t.c3 > date '2011-04-26 19:18:44') ;
 
25
count(*)
 
26
0
 
27
DROP TABLE t1;
 
28
#
3
29
# Bug#51830: Incorrect partition pruning on range partition (regression)
4
30
#
5
31
CREATE TABLE t1 (a INT NOT NULL)
22
48
ERROR HY000: Table has no partition for value 110
23
49
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 90;
24
50
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
25
 
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    5       Using where
 
51
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    0       Using where
26
52
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 90;
27
53
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
28
 
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    5       Using where
 
54
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    0       Using where
29
55
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 90;
30
56
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
31
 
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    5       Using where
 
57
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    0       Using where
32
58
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 89;
33
59
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
34
 
1       SIMPLE  t1      p90     ALL     NULL    NULL    NULL    NULL    7       Using where
 
60
1       SIMPLE  t1      p90     ALL     NULL    NULL    NULL    NULL    3       Using where
35
61
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 89;
36
62
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
37
 
1       SIMPLE  t1      p90     ALL     NULL    NULL    NULL    NULL    7       Using where
 
63
1       SIMPLE  t1      p90     ALL     NULL    NULL    NULL    NULL    3       Using where
38
64
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 89;
39
65
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
40
 
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    7       Using where
 
66
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    0       Using where
41
67
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 100;
42
68
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
43
 
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    7       Using where
 
69
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    0       Using where
44
70
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 100;
45
71
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
46
 
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    7       Using where
 
72
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    0       Using where
47
73
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 100;
48
74
id      select_type     table   partitions      type    possible_keys   key     key_len ref     rows    Extra
49
 
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    7       Using where
 
75
1       SIMPLE  t1              ALL     NULL    NULL    NULL    NULL    0       Using where
50
76
DROP TABLE t1;
51
77
#
52
78
# Bug#50104: Partitioned table with just 1 partion works with fk
387
413
3       2003-03-03
388
414
COMMIT;
389
415
DROP TABLE t1;
 
416
CREATE TABLE t1 (i1 int NOT NULL primary key, f1 int) ENGINE = InnoDB
 
417
PARTITION BY HASH(i1) PARTITIONS 2;
 
418
INSERT INTO t1 VALUES (1,1), (2,2);
 
419
SELECT * FROM t1 WHERE i1 = ( SELECT i1 FROM t1 WHERE f1=0 LIMIT 1 );
 
420
i1      f1
 
421
DROP TABLE t1;