Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9d7c3cbe
Commit
9d7c3cbe
authored
Apr 01, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CONNECT: simple vcol test
parent
5d5e8327
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
storage/connect/mysql-test/connect/r/vcol.result
storage/connect/mysql-test/connect/r/vcol.result
+29
-0
storage/connect/mysql-test/connect/t/vcol.test
storage/connect/mysql-test/connect/t/vcol.test
+26
-0
No files found.
storage/connect/mysql-test/connect/r/vcol.result
0 → 100644
View file @
9d7c3cbe
create table t1 (
#linenum int(6) not null default 0 special=rowid,
name char(12) not null,
city char(11) not null,
birth date not null date_format='DD/MM/YYYY',
hired date not null date_format='DD/MM/YYYY' flag=36,
agehired int(3) as (floor(datediff(hired,birth)/365.25))
)
engine=CONNECT table_type=FIX file_name='boys.txt' mapped=YES lrecl=47;
select * from t1;
name city birth hired agehired
John Boston 1986-01-25 2010-06-02 24
Henry Boston 1987-06-07 2008-04-01 20
George San Jose 1981-08-10 2010-06-02 28
Sam Chicago 1979-11-22 2007-10-10 27
James Dallas 1992-05-13 2009-12-14 17
Bill Boston 1986-09-11 2008-02-10 21
drop table t1;
create table t1 (
#linenum int(6) not null default 0 special=rowid,
name char(12) not null,
city char(11) not null,
birth date not null date_format='DD/MM/YYYY',
hired date not null date_format='DD/MM/YYYY' flag=36,
agehired int(3) as (floor(datediff(hired,birth)/365.25)),
index (agehired)
)
engine=CONNECT table_type=FIX file_name='boys.txt' mapped=YES lrecl=47;
ERROR 42000: Table handler doesn't support NULL in given index. Please change column 'agehired' to be NOT NULL or use another handler
storage/connect/mysql-test/connect/t/vcol.test
0 → 100644
View file @
9d7c3cbe
let
datadir
=
`select @@datadir`
;
--
copy_file
$MTR_SUITE_DIR
/
std_data
/
boys
.
txt
$datadir
/
test
/
boys
.
txt
create
table
t1
(
#linenum int(6) not null default 0 special=rowid,
name
char
(
12
)
not
null
,
city
char
(
11
)
not
null
,
birth
date
not
null
date_format
=
'DD/MM/YYYY'
,
hired
date
not
null
date_format
=
'DD/MM/YYYY'
flag
=
36
,
agehired
int
(
3
)
as
(
floor
(
datediff
(
hired
,
birth
)
/
365.25
))
)
engine
=
CONNECT
table_type
=
FIX
file_name
=
'boys.txt'
mapped
=
YES
lrecl
=
47
;
select
*
from
t1
;
drop
table
t1
;
--
error
ER_NULL_COLUMN_IN_INDEX
create
table
t1
(
#linenum int(6) not null default 0 special=rowid,
name
char
(
12
)
not
null
,
city
char
(
11
)
not
null
,
birth
date
not
null
date_format
=
'DD/MM/YYYY'
,
hired
date
not
null
date_format
=
'DD/MM/YYYY'
flag
=
36
,
agehired
int
(
3
)
as
(
floor
(
datediff
(
hired
,
birth
)
/
365.25
)),
index
(
agehired
)
)
engine
=
CONNECT
table_type
=
FIX
file_name
=
'boys.txt'
mapped
=
YES
lrecl
=
47
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment