File: ndb_column_properties.test

package info (click to toggle)
percona-xtrabackup 2.2.3-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 293,260 kB
  • ctags: 146,881
  • sloc: cpp: 1,051,960; ansic: 570,217; java: 54,595; perl: 53,495; pascal: 44,194; sh: 27,826; yacc: 15,314; python: 12,142; xml: 7,848; sql: 4,125; makefile: 1,459; awk: 785; lex: 758
file content (125 lines) | stat: -rw-r--r-- 4,592 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
-- source include/have_ndb.inc

--disable_warnings
drop table if exists t1;
--enable_warnings

CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 1M
UNDO_BUFFER_SIZE = 1M
ENGINE=NDB;

CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1
INITIAL_SIZE 6M
ENGINE NDB;

create table t1 (a int column_format DYNAMIC STORAGE DISK) TABLESPACE ts1 engine NDB;
#select column_name, storage, format from information_schema.columns
#where table_name = "t1";
show create table t1;
source show_attributes.inc;
drop table t1;

create table t1 (a int column_format DYNAMIC,
                 a1 int column_format FIXED,
                 b int NOT NULL column_format DYNAMIC,
                 b1 int NOT NULL column_format FIXED storage DISK,
                 c VARCHAR(100) column_format FIXED,
                 c1 VARCHAR(100) column_format DYNAMIC storage memory,
                 d VARCHAR(100) NOT NULL column_format FIXED,
                 d1 VARCHAR(100) NOT NULL column_format DYNAMIC,
                 e CHAR(100) column_format FIXED,
                 e1 CHAR(100) column_format DYNAMIC,
                 f CHAR(100) NOT NULL column_format FIXED,
                 f1 char(100) NOT NULL column_format DYNAMIC storage DISK,
                 index (b)) TABLESPACE ts1 engine NDB;
insert into t1 (b, b1, d,d1,f,f1) values
(1,1,"1","1","1","1"),
(2,2,"2","2","2","2"),
(3,3,"3","3","3","3");
alter table t1 change column a a int column_format FIXED;
show create table t1;
#select column_name, storage, format from information_schema.columns
#where table_name = "t1";
alter table t1 change column a a int storage disk;
show create table t1;
source show_attributes.inc;
alter table t1 change column a a int storage memory;
show create table t1;
source show_attributes.inc;
alter table t1 change column b b int NOT NULL storage memory;
alter table t1 add column a2 int column_format FIXED;
show create table t1;
source show_attributes.inc;
alter table t1 add column c2 VARCHAR(100) column_format DYNAMIC;
show create table t1;
source show_attributes.inc;
alter table t1 add column c3 VARCHAR(100) column_format FIXED;
show create table t1;
source show_attributes.inc;
drop table t1;

create table t1 (a int storage disk column_format FIXED) TABLESPACE ts1 engine NDB;
alter table t1 change column a a int storage memory column_format DYNAMIC;
show create table t1;
source show_attributes.inc;
drop table t1;

# Checking keywords
create table t1 (column_format int storage disk column_format FIXED, storage int storage disk column_format FIXED) TABLESPACE ts1 engine NDB;
show create table t1;
source show_attributes.inc;
drop table t1;

ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat'
ENGINE NDB;

drop tablespace ts1
engine ndb;

drop logfile group lg1
engine ndb;

CREATE TABLE t1 (
  pk1 INT NOT NULL auto_increment,
  c00 int not null column_format dynamic,
  c01 int not null column_format dynamic,
  c02 int not null column_format dynamic,
  c03 int not null column_format dynamic,
  c04 int not null column_format dynamic,
  c05 int not null column_format dynamic,
  c06 int not null column_format dynamic,
  c07 int not null column_format dynamic,
  c08 int not null column_format dynamic,
  c09 int not null column_format dynamic,
  c10 int not null column_format dynamic,
  c11 int not null column_format dynamic,
  c12 int not null column_format dynamic,
  c13 int not null column_format dynamic,
  c14 int not null column_format dynamic,
  c15 int not null column_format dynamic,
  c16 int not null column_format dynamic,
  c17 int not null column_format dynamic,
  c18 int not null column_format dynamic,
  c19 int not null column_format dynamic,
  primary key(pk1)
) ENGINE=ndbcluster;

insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
insert into t1 values(null,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
select * from t1 order by 1;
delete from t1;

drop table t1;