~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to storage/tokudb/mysql-test/tokudb_alter_table/t/other_alter2.test

  • Committer: Package Import Robot
  • Author(s): James Page, Otto Kekäläinen
  • Date: 2014-02-17 16:51:52 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140217165152-k315d3175g865kkx
Tags: 5.5.35-1
[ Otto Kekäläinen ]
* New upstream release, fixing the following security issues:
  - Buffer overflow in client/mysql.cc (Closes: #737597).
    - CVE-2014-0001
  - http://www.oracle.com/technetwork/topics/security/cpujan2014-1972949.html
    - CVE-2013-5891
    - CVE-2013-5908
    - CVE-2014-0386
    - CVE-2014-0393
    - CVE-2014-0401
    - CVE-2014-0402
    - CVE-2014-0412
    - CVE-2014-0420
    - CVE-2014-0437
* Upstream https://mariadb.atlassian.net/browse/MDEV-4902
  fixes compatibility with Bison 3.0 (Closes: #733002)
* Updated Russian debconf translation (Closes: #734426)
* Updated Japanese debconf translation (Closes: #735284)
* Updated French debconf translation (Closes: #736480)
* Renamed SONAME properly (Closes: #732967)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#--source include/have_tokudb.inc
 
2
SET DEFAULT_STORAGE_ENGINE='tokudb';
 
3
 
 
4
--disable_warnings
 
5
DROP TABLE IF EXISTS foo,bar, foo_isam, bar_isam;
 
6
--enable_warnings
 
7
 
 
8
set session tokudb_disable_slow_alter=OFF;
 
9
let $diff_tables= test.foo, test.foo_isam;
 
10
 
 
11
create table foo (aa int, bb int, cc int, dd int, ee int, a int, b varchar(20), c int, d int, e int, primary key (e), key(d), unique key(c), key (b) clustering=yes)engine=TokuDB;
 
12
create table foo_isam like foo;
 
13
alter table foo_isam engine=MyISAM;
 
14
create table bar (a int) engine=TokuDB;
 
15
create table bar_isam like bar;
 
16
alter table bar_isam engine=MyISAM;
 
17
 
 
18
insert into foo values (1,10,100,1000,10000,1,"bb",10,100,1000);
 
19
insert into foo values (2,20,200,2000,20000,2,"bbb",20,200,2000);
 
20
insert into foo values (3,30,300,3000,30000,3,"bbbb",30,300,3000);
 
21
insert into foo_isam select * from foo;
 
22
 
 
23
 
 
24
alter table foo drop primary key;
 
25
alter table foo_isam drop primary key;
 
26
source include/diff_tables.inc;
 
27
alter table foo add primary key (e);
 
28
alter table foo_isam add primary key (e);
 
29
source include/diff_tables.inc;
 
30
alter table foo drop primary key, add primary key(a);
 
31
alter table foo_isam drop primary key, add primary key (a);
 
32
source include/diff_tables.inc;
 
33
 
 
34
--error ER_TABLE_CANT_HANDLE_FT
 
35
alter table foo add fulltext key(b);
 
36
--error ER_TABLE_CANT_HANDLE_SPKEYS
 
37
alter table foo add spatial key (aa);
 
38
 
 
39
# Supporting these should be trivial
 
40
alter table foo alter column cc set default 101010;
 
41
alter table foo_isam alter column cc set default 101010;
 
42
source include/diff_tables.inc;
 
43
alter table foo alter column cc set default NULL;
 
44
alter table foo_isam alter column cc set default NULL;
 
45
source include/diff_tables.inc;
 
46
alter table foo alter column cc drop default;
 
47
alter table foo_isam alter column cc drop default;
 
48
source include/diff_tables.inc;
 
49
 
 
50
 
 
51
alter table foo change column aa aaa int;
 
52
alter table foo_isam change column aa aaa int;
 
53
source include/diff_tables.inc;
 
54
alter table foo change column aaa aa int;
 
55
alter table foo_isam change column aaa aa int;
 
56
source include/diff_tables.inc;
 
57
 
 
58
 
 
59
alter table foo change column e epk int;
 
60
alter table foo_isam change column e epk int;
 
61
source include/diff_tables.inc;
 
62
alter table foo change column epk e int;
 
63
alter table foo_isam change column epk e int;
 
64
source include/diff_tables.inc;
 
65
 
 
66
show create table foo;
 
67
show create table foo_isam;
 
68
 
 
69
# the following changes of a column should be slow
 
70
alter table foo change column aa aa int NOT NULL;
 
71
alter table foo_isam change column aa aa int NOT NULL;
 
72
source include/diff_tables.inc;
 
73
alter table foo change column aa aa bigint;
 
74
alter table foo_isam change column aa aa bigint;
 
75
source include/diff_tables.inc;
 
76
alter table foo change column aa aa varchar(20);
 
77
alter table foo_isam change column aa aa varchar(20);
 
78
source include/diff_tables.inc;
 
79
alter table foo change column aa aa int after cc;
 
80
alter table foo_isam change column aa aa int after cc;
 
81
source include/diff_tables.inc;
 
82
 
 
83
 
 
84
alter table foo modify column aa int NOT NULL;
 
85
alter table foo_isam modify column aa int NOT NULL;
 
86
source include/diff_tables.inc;
 
87
alter table foo modify column aa bigint;
 
88
alter table foo_isam modify column aa bigint;
 
89
source include/diff_tables.inc;
 
90
alter table foo modify column aa varchar(20);
 
91
alter table foo_isam modify column aa varchar(20);
 
92
source include/diff_tables.inc;
 
93
alter table foo modify column aa int after cc;
 
94
alter table foo_isam modify column aa int after cc;
 
95
source include/diff_tables.inc;
 
96
 
 
97
 
 
98
drop table foo;
 
99
drop table bar;
 
100
drop table foo_isam;
 
101
drop table bar_isam;