mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Added new test/result file ndb_types to test creating tables with different column types in NDB
This commit is contained in:
parent
4baaca9560
commit
80e15e2dd4
2 changed files with 83 additions and 0 deletions
36
mysql-test/r/ndb_types.result
Normal file
36
mysql-test/r/ndb_types.result
Normal file
|
@ -0,0 +1,36 @@
|
|||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (
|
||||
auto int(5) unsigned NOT NULL auto_increment,
|
||||
string char(10) default "hello",
|
||||
tiny tinyint(4) DEFAULT '0' NOT NULL ,
|
||||
short smallint(6) DEFAULT '1' NOT NULL ,
|
||||
medium mediumint(8) DEFAULT '0' NOT NULL,
|
||||
long_int int(11) DEFAULT '0' NOT NULL,
|
||||
longlong bigint(13) DEFAULT '0' NOT NULL,
|
||||
real_float float(13,1) DEFAULT 0.0 NOT NULL,
|
||||
real_double double(16,4),
|
||||
utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
|
||||
ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
|
||||
umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
|
||||
ulong int(11) unsigned DEFAULT '0' NOT NULL,
|
||||
ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
|
||||
time_stamp timestamp,
|
||||
date_field date,
|
||||
time_field time,
|
||||
date_time datetime,
|
||||
options enum('one','two','tree') not null,
|
||||
flags set('one','two','tree') not null,
|
||||
PRIMARY KEY (auto),
|
||||
KEY (utiny),
|
||||
KEY (tiny),
|
||||
KEY (short),
|
||||
KEY any_name (medium),
|
||||
KEY (longlong),
|
||||
KEY (real_float),
|
||||
KEY (ushort),
|
||||
KEY (umedium),
|
||||
KEY (ulong),
|
||||
KEY (ulonglong,ulong),
|
||||
KEY (options,flags)
|
||||
);
|
||||
drop table t1;
|
47
mysql-test/t/ndb_types.test
Normal file
47
mysql-test/t/ndb_types.test
Normal file
|
@ -0,0 +1,47 @@
|
|||
-- source include/have_ndb.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Test creation of different column types in NDB
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
auto int(5) unsigned NOT NULL auto_increment,
|
||||
string char(10) default "hello",
|
||||
tiny tinyint(4) DEFAULT '0' NOT NULL ,
|
||||
short smallint(6) DEFAULT '1' NOT NULL ,
|
||||
medium mediumint(8) DEFAULT '0' NOT NULL,
|
||||
long_int int(11) DEFAULT '0' NOT NULL,
|
||||
longlong bigint(13) DEFAULT '0' NOT NULL,
|
||||
real_float float(13,1) DEFAULT 0.0 NOT NULL,
|
||||
real_double double(16,4),
|
||||
utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
|
||||
ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
|
||||
umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
|
||||
ulong int(11) unsigned DEFAULT '0' NOT NULL,
|
||||
ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
|
||||
time_stamp timestamp,
|
||||
date_field date,
|
||||
time_field time,
|
||||
date_time datetime,
|
||||
options enum('one','two','tree') not null,
|
||||
flags set('one','two','tree') not null,
|
||||
PRIMARY KEY (auto),
|
||||
KEY (utiny),
|
||||
KEY (tiny),
|
||||
KEY (short),
|
||||
KEY any_name (medium),
|
||||
KEY (longlong),
|
||||
KEY (real_float),
|
||||
KEY (ushort),
|
||||
KEY (umedium),
|
||||
KEY (ulong),
|
||||
KEY (ulonglong,ulong),
|
||||
KEY (options,flags)
|
||||
);
|
||||
|
||||
|
||||
drop table t1;
|
Loading…
Reference in a new issue