File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
storage/connect/mysql-test/connect Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ create table t1 (
2
+ #linenum int(6) not null default 0 special=rowid,
3
+ name char(12) not null,
4
+ city char(11) not null,
5
+ birth date not null date_format='DD/MM/YYYY',
6
+ hired date not null date_format='DD/MM/YYYY' flag=36,
7
+ agehired int(3) as (floor(datediff(hired,birth)/365.25))
8
+ )
9
+ engine=CONNECT table_type=FIX file_name='boys.txt' mapped=YES lrecl=47;
10
+ select * from t1;
11
+ name city birth hired agehired
12
+ John Boston 1986-01-25 2010-06-02 24
13
+ Henry Boston 1987-06-07 2008-04-01 20
14
+ George San Jose 1981-08-10 2010-06-02 28
15
+ Sam Chicago 1979-11-22 2007-10-10 27
16
+ James Dallas 1992-05-13 2009-12-14 17
17
+ Bill Boston 1986-09-11 2008-02-10 21
18
+ drop table t1;
19
+ create table t1 (
20
+ #linenum int(6) not null default 0 special=rowid,
21
+ name char(12) not null,
22
+ city char(11) not null,
23
+ birth date not null date_format='DD/MM/YYYY',
24
+ hired date not null date_format='DD/MM/YYYY' flag=36,
25
+ agehired int(3) as (floor(datediff(hired,birth)/365.25)),
26
+ index (agehired)
27
+ )
28
+ engine=CONNECT table_type=FIX file_name='boys.txt' mapped=YES lrecl=47;
29
+ ERROR 42000: Table handler doesn't support NULL in given index. Please change column 'agehired' to be NOT NULL or use another handler
Original file line number Diff line number Diff line change
1
+ let datadir= `select @@datadir`;
2
+ --copy_file $MTR_SUITE_DIR/std_data/boys.txt $datadir/test/boys.txt
3
+
4
+ create table t1 (
5
+ #linenum int(6) not null default 0 special=rowid,
6
+ name char(12) not null,
7
+ city char(11) not null,
8
+ birth date not null date_format='DD/MM/YYYY',
9
+ hired date not null date_format='DD/MM/YYYY' flag=36,
10
+ agehired int(3) as (floor(datediff(hired,birth)/365.25))
11
+ )
12
+ engine=CONNECT table_type=FIX file_name='boys.txt' mapped=YES lrecl=47;
13
+ select * from t1;
14
+ drop table t1;
15
+
16
+ --error ER_NULL_COLUMN_IN_INDEX
17
+ create table t1 (
18
+ #linenum int(6) not null default 0 special=rowid,
19
+ name char(12) not null,
20
+ city char(11) not null,
21
+ birth date not null date_format='DD/MM/YYYY',
22
+ hired date not null date_format='DD/MM/YYYY' flag=36,
23
+ agehired int(3) as (floor(datediff(hired,birth)/365.25)),
24
+ index (agehired)
25
+ )
26
+ engine=CONNECT table_type=FIX file_name='boys.txt' mapped=YES lrecl=47;
You can’t perform that action at this time.
0 commit comments