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
7230ef32
Commit
7230ef32
authored
Apr 01, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more types
parent
eb921b45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
22 deletions
+28
-22
mysql-test/r/ndb_types.result
mysql-test/r/ndb_types.result
+16
-13
mysql-test/t/ndb_types.test
mysql-test/t/ndb_types.test
+12
-9
No files found.
mysql-test/r/ndb_types.result
View file @
7230ef32
...
@@ -12,11 +12,13 @@ long_int int(11) DEFAULT '0' NOT NULL,
...
@@ -12,11 +12,13 @@ long_int int(11) DEFAULT '0' NOT NULL,
longlong bigint(13) DEFAULT '0' NOT NULL,
longlong bigint(13) DEFAULT '0' NOT NULL,
real_float float(13,1) DEFAULT 0.0 NOT NULL,
real_float float(13,1) DEFAULT 0.0 NOT NULL,
real_double double(16,4),
real_double double(16,4),
real_decimal decimal(16,4),
utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
ulong int(11) unsigned DEFAULT '0' NOT NULL,
ulong int(11) unsigned DEFAULT '0' NOT NULL,
ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
bits bit(3),
options enum('one','two','tree') not null,
options enum('one','two','tree') not null,
flags set('one','two','tree') not null,
flags set('one','two','tree') not null,
date_field date,
date_field date,
...
@@ -40,32 +42,33 @@ KEY (options,flags)
...
@@ -40,32 +42,33 @@ KEY (options,flags)
set @now = now();
set @now = now();
insert into t1
insert into t1
(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
real_float,real_double, utiny, ushort, umedium,ulong,ulonglong,
real_float,real_double,
real_decimal,
utiny, ushort, umedium,ulong,ulonglong,
options,flags,date_field,year_field,time_field,date_time)
bits,
options,flags,date_field,year_field,time_field,date_time)
values
values
("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1,1,1,1,1,
("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1
.1,1
,1,1,1,1,
'one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01');
b'001',
'one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01');
select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
real_float,real_double,
utiny, ushort,
umedium,ulong,ulonglong,
real_float,real_double,
real_decimal,utiny,ushort,
umedium,ulong,ulonglong,
options,flags,date_field,year_field,time_field,date_time
bits,
options,flags,date_field,year_field,time_field,date_time
from t1;
from t1;
auto string vstring bin vbin tiny short medium long_int longlong real_float real_double
utiny ushort umedium ulong ulonglong
options flags date_field year_field time_field date_time
auto string vstring bin vbin tiny short medium long_int longlong real_float real_double
real_decimal utiny ushort umedium ulong ulonglong bits
options flags date_field year_field time_field date_time
1 aaaa aaaa -1 -1 -1 -1 -1 1.1 1.1000 1
00001 1 1 1
one one 1901-01-01 1901 01:01:01 1901-01-01 01:01:01
1 aaaa aaaa -1 -1 -1 -1 -1 1.1 1.1000 1
.1000 1 00001 1 1 1
one one 1901-01-01 1901 01:01:01 1901-01-01 01:01:01
select time_stamp>@now from t1;
select time_stamp>@now from t1;
time_stamp>@now
time_stamp>@now
1
1
set @now = now();
set @now = now();
update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB,
update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB,
tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2,
tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2,
real_double=2.2,utiny=2,ushort=2,umedium=2,ulong=2,ulonglong=2,
real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2,
ulonglong=2, bits=b'010',
options='one',flags='one', date_field='1902-02-02',year_field='1902',
options='one',flags='one', date_field='1902-02-02',year_field='1902',
time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1;
time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1;
select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
real_float,real_double,
utiny, ushort,
umedium,ulong,ulonglong,
real_float,real_double,
real_decimal,utiny,ushort,
umedium,ulong,ulonglong,
options,flags,date_field,year_field,time_field,date_time
bits,
options,flags,date_field,year_field,time_field,date_time
from t1;
from t1;
auto string vstring bin vbin tiny short medium long_int longlong real_float real_double
utiny ushort umedium ulong ulonglong
options flags date_field year_field time_field date_time
auto string vstring bin vbin tiny short medium long_int longlong real_float real_double
real_decimal utiny ushort umedium ulong ulonglong bits
options flags date_field year_field time_field date_time
1 bbbb bbbb -2 -2 -2 -2 -2 2.2 2.2000 2
00002 2 2 2
one one 1902-02-02 1902 02:02:02 1902-02-02 02:02:02
1 bbbb bbbb -2 -2 -2 -2 -2 2.2 2.2000 2
.2000 2 00002 2 2 2
one one 1902-02-02 1902 02:02:02 1902-02-02 02:02:02
select time_stamp>@now from t1;
select time_stamp>@now from t1;
time_stamp>@now
time_stamp>@now
1
1
...
...
mysql-test/t/ndb_types.test
View file @
7230ef32
...
@@ -20,11 +20,13 @@ CREATE TABLE t1 (
...
@@ -20,11 +20,13 @@ CREATE TABLE t1 (
longlong
bigint
(
13
)
DEFAULT
'0'
NOT
NULL
,
longlong
bigint
(
13
)
DEFAULT
'0'
NOT
NULL
,
real_float
float
(
13
,
1
)
DEFAULT
0.0
NOT
NULL
,
real_float
float
(
13
,
1
)
DEFAULT
0.0
NOT
NULL
,
real_double
double
(
16
,
4
),
real_double
double
(
16
,
4
),
real_decimal
decimal
(
16
,
4
),
utiny
tinyint
(
3
)
unsigned
DEFAULT
'0'
NOT
NULL
,
utiny
tinyint
(
3
)
unsigned
DEFAULT
'0'
NOT
NULL
,
ushort
smallint
(
5
)
unsigned
zerofill
DEFAULT
'00000'
NOT
NULL
,
ushort
smallint
(
5
)
unsigned
zerofill
DEFAULT
'00000'
NOT
NULL
,
umedium
mediumint
(
8
)
unsigned
DEFAULT
'0'
NOT
NULL
,
umedium
mediumint
(
8
)
unsigned
DEFAULT
'0'
NOT
NULL
,
ulong
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
ulong
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
ulonglong
bigint
(
13
)
unsigned
DEFAULT
'0'
NOT
NULL
,
ulonglong
bigint
(
13
)
unsigned
DEFAULT
'0'
NOT
NULL
,
bits
bit
(
3
),
options
enum
(
'one'
,
'two'
,
'tree'
)
not
null
,
options
enum
(
'one'
,
'two'
,
'tree'
)
not
null
,
flags
set
(
'one'
,
'two'
,
'tree'
)
not
null
,
flags
set
(
'one'
,
'two'
,
'tree'
)
not
null
,
date_field
date
,
date_field
date
,
...
@@ -50,15 +52,15 @@ set @now = now();
...
@@ -50,15 +52,15 @@ set @now = now();
sleep
1
;
sleep
1
;
insert
into
t1
insert
into
t1
(
string
,
vstring
,
bin
,
vbin
,
tiny
,
short
,
medium
,
long_int
,
longlong
,
(
string
,
vstring
,
bin
,
vbin
,
tiny
,
short
,
medium
,
long_int
,
longlong
,
real_float
,
real_double
,
utiny
,
ushort
,
umedium
,
ulong
,
ulonglong
,
real_float
,
real_double
,
real_decimal
,
utiny
,
ushort
,
umedium
,
ulong
,
ulonglong
,
options
,
flags
,
date_field
,
year_field
,
time_field
,
date_time
)
bits
,
options
,
flags
,
date_field
,
year_field
,
time_field
,
date_time
)
values
values
(
"aaaa"
,
"aaaa"
,
0xAAAA
,
0xAAAA
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
1.1
,
1.1
,
1
,
1
,
1
,
1
,
1
,
(
"aaaa"
,
"aaaa"
,
0xAAAA
,
0xAAAA
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
1.1
,
1.1
,
1
.1
,
1
,
1
,
1
,
1
,
1
,
'one'
,
'one'
,
'1901-01-01'
,
'1901'
,
'01:01:01'
,
'1901-01-01 01:01:01'
);
b
'001'
,
'one'
,
'one'
,
'1901-01-01'
,
'1901'
,
'01:01:01'
,
'1901-01-01 01:01:01'
);
select
auto
,
string
,
vstring
,
bin
,
vbin
,
tiny
,
short
,
medium
,
long_int
,
longlong
,
select
auto
,
string
,
vstring
,
bin
,
vbin
,
tiny
,
short
,
medium
,
long_int
,
longlong
,
real_float
,
real_double
,
utiny
,
ushort
,
umedium
,
ulong
,
ulonglong
,
real_float
,
real_double
,
real_decimal
,
utiny
,
ushort
,
umedium
,
ulong
,
ulonglong
,
options
,
flags
,
date_field
,
year_field
,
time_field
,
date_time
bits
,
options
,
flags
,
date_field
,
year_field
,
time_field
,
date_time
from
t1
;
from
t1
;
select
time_stamp
>@
now
from
t1
;
select
time_stamp
>@
now
from
t1
;
...
@@ -66,13 +68,14 @@ set @now = now();
...
@@ -66,13 +68,14 @@ set @now = now();
sleep
1
;
sleep
1
;
update
t1
set
string
=
"bbbb"
,
vstring
=
"bbbb"
,
bin
=
0xBBBB
,
vbin
=
0xBBBB
,
update
t1
set
string
=
"bbbb"
,
vstring
=
"bbbb"
,
bin
=
0xBBBB
,
vbin
=
0xBBBB
,
tiny
=-
2
,
short
=-
2
,
medium
=-
2
,
long_int
=-
2
,
longlong
=-
2
,
real_float
=
2.2
,
tiny
=-
2
,
short
=-
2
,
medium
=-
2
,
long_int
=-
2
,
longlong
=-
2
,
real_float
=
2.2
,
real_double
=
2.2
,
utiny
=
2
,
ushort
=
2
,
umedium
=
2
,
ulong
=
2
,
ulonglong
=
2
,
real_double
=
2.2
,
real_decimal
=
2.2
,
utiny
=
2
,
ushort
=
2
,
umedium
=
2
,
ulong
=
2
,
ulonglong
=
2
,
bits
=
b
'010'
,
options
=
'one'
,
flags
=
'one'
,
date_field
=
'1902-02-02'
,
year_field
=
'1902'
,
options
=
'one'
,
flags
=
'one'
,
date_field
=
'1902-02-02'
,
year_field
=
'1902'
,
time_field
=
'02:02:02'
,
date_time
=
'1902-02-02 02:02:02'
where
auto
=
1
;
time_field
=
'02:02:02'
,
date_time
=
'1902-02-02 02:02:02'
where
auto
=
1
;
select
auto
,
string
,
vstring
,
bin
,
vbin
,
tiny
,
short
,
medium
,
long_int
,
longlong
,
select
auto
,
string
,
vstring
,
bin
,
vbin
,
tiny
,
short
,
medium
,
long_int
,
longlong
,
real_float
,
real_double
,
utiny
,
ushort
,
umedium
,
ulong
,
ulonglong
,
real_float
,
real_double
,
real_decimal
,
utiny
,
ushort
,
umedium
,
ulong
,
ulonglong
,
options
,
flags
,
date_field
,
year_field
,
time_field
,
date_time
bits
,
options
,
flags
,
date_field
,
year_field
,
time_field
,
date_time
from
t1
;
from
t1
;
select
time_stamp
>@
now
from
t1
;
select
time_stamp
>@
now
from
t1
;
...
...
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