summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <pekka@mysql.com>2005-01-09 00:45:06 +0100
committerunknown <pekka@mysql.com>2005-01-09 00:45:06 +0100
commitf029af067b5e68222d3b52e5c3c400ba47ef411d (patch)
treef4e1eba2241ebc4cef73aa11e6ed710e36bb2d41 /mysql-test/r
parent3fbb1dd5fff45824f25916ad40488592a067ca86 (diff)
parent09a487266171a297db9fab88710c224e7526e8b6 (diff)
downloadmariadb-git-f029af067b5e68222d3b52e5c3c400ba47ef411d.tar.gz
Merge
ndb/src/ndbapi/NdbDictionary.cpp: Auto merged ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged sql/ha_ndbcluster.cc: Auto merged ndb/include/ndb_constants.h: merge 5.0->5.0-ndb ndb/include/kernel/signaldata/DictTabInfo.hpp: merge 5.0->5.0-ndb ndb/include/ndbapi/NdbDictionary.hpp: merge 5.0->5.0-ndb ndb/include/util/NdbSqlUtil.hpp: merge 5.0->5.0-ndb ndb/src/common/util/NdbSqlUtil.cpp: merge 5.0->5.0-ndb
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/ndb_index_ordered.result110
-rw-r--r--mysql-test/r/type_float.result36
-rw-r--r--mysql-test/r/type_float.result.es40
3 files changed, 184 insertions, 2 deletions
diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result
index 1cf2a97a6b3..ccb202b25a8 100644
--- a/mysql-test/r/ndb_index_ordered.result
+++ b/mysql-test/r/ndb_index_ordered.result
@@ -419,3 +419,113 @@ SubscrID SbclID
3 NULL
drop table test1;
drop table test2;
+create table t1 (
+pk int primary key,
+dt datetime not null,
+da date not null,
+ye year not null,
+ti time not null,
+ts timestamp not null,
+index(dt),
+index(da),
+index(ye),
+index(ti),
+index(ts)
+) engine=ndb;
+insert into t1 (pk,dt,da,ye,ti) values
+(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59'),
+(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59'),
+(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00'),
+(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'),
+(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06'),
+(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06'),
+(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10'),
+(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'),
+(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59');
+select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00';
+count(*)-9
+0
+select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00';
+count(*)-6
+0
+select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00';
+count(*)-5
+0
+select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22';
+count(*)-5
+0
+select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11';
+count(*)-7
+0
+select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11';
+count(*)-8
+0
+select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00';
+count(*)-9
+0
+select count(*)-9 from t1 use index (da) where da > '1900-01-01';
+count(*)-9
+0
+select count(*)-6 from t1 use index (da) where da >= '1955-12-31';
+count(*)-6
+0
+select count(*)-5 from t1 use index (da) where da > '1955-12-31';
+count(*)-5
+0
+select count(*)-5 from t1 use index (da) where da < '1970-03-03';
+count(*)-5
+0
+select count(*)-6 from t1 use index (da) where da < '2001-01-01';
+count(*)-6
+0
+select count(*)-8 from t1 use index (da) where da <= '2001-01-02';
+count(*)-8
+0
+select count(*)-9 from t1 use index (da) where da <= '2055-01-01';
+count(*)-9
+0
+select count(*)-9 from t1 use index (ye) where ye > '1900';
+count(*)-9
+0
+select count(*)-6 from t1 use index (ye) where ye >= '1955';
+count(*)-6
+0
+select count(*)-5 from t1 use index (ye) where ye > '1955';
+count(*)-5
+0
+select count(*)-5 from t1 use index (ye) where ye < '1970';
+count(*)-5
+0
+select count(*)-6 from t1 use index (ye) where ye < '2001';
+count(*)-6
+0
+select count(*)-8 from t1 use index (ye) where ye <= '2001';
+count(*)-8
+0
+select count(*)-9 from t1 use index (ye) where ye <= '2055';
+count(*)-9
+0
+select count(*)-9 from t1 use index (ti) where ti >= '00:00:00';
+count(*)-9
+0
+select count(*)-7 from t1 use index (ti) where ti > '00:00:00';
+count(*)-7
+0
+select count(*)-7 from t1 use index (ti) where ti > '05:05:05';
+count(*)-7
+0
+select count(*)-5 from t1 use index (ti) where ti > '06:06:06';
+count(*)-5
+0
+select count(*)-5 from t1 use index (ti) where ti < '10:11:11';
+count(*)-5
+0
+select count(*)-6 from t1 use index (ti) where ti <= '10:11:11';
+count(*)-6
+0
+select count(*)-8 from t1 use index (ti) where ti < '23:59:59';
+count(*)-8
+0
+select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
+count(*)-9
+0
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 151ec404455..62aae177f6a 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -143,3 +143,39 @@ drop table t1;
create table t1 (f float(54));
ERROR 42000: Incorrect column specifier for column 'f'
drop table if exists t1;
+create table t1 (f float(4,3));
+insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
+Warnings:
+Warning 1264 Out of range value adjusted for column 'f' at row 1
+Warning 1264 Out of range value adjusted for column 'f' at row 2
+Warning 1264 Out of range value adjusted for column 'f' at row 3
+Warning 1264 Out of range value adjusted for column 'f' at row 4
+Warning 1264 Out of range value adjusted for column 'f' at row 5
+Warning 1264 Out of range value adjusted for column 'f' at row 6
+select * from t1;
+f
+-9.999
+-9.999
+-9.999
+9.999
+9.999
+9.999
+drop table if exists t1;
+create table t1 (f double(4,3));
+insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
+Warnings:
+Warning 1264 Out of range value adjusted for column 'f' at row 1
+Warning 1264 Out of range value adjusted for column 'f' at row 2
+Warning 1264 Out of range value adjusted for column 'f' at row 3
+Warning 1264 Out of range value adjusted for column 'f' at row 4
+Warning 1264 Out of range value adjusted for column 'f' at row 5
+Warning 1264 Out of range value adjusted for column 'f' at row 6
+select * from t1;
+f
+-9.999
+-9.999
+-9.999
+9.999
+9.999
+9.999
+drop table if exists t1;
diff --git a/mysql-test/r/type_float.result.es b/mysql-test/r/type_float.result.es
index 4bfe644d7fb..d1c72a2ee53 100644
--- a/mysql-test/r/type_float.result.es
+++ b/mysql-test/r/type_float.result.es
@@ -15,8 +15,8 @@ f1 float NULL YES NULL
f2 double NULL YES NULL
insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150);
Warnings:
-Warning 1264 Data truncated; out of range for column 'f1' at row 7
-Warning 1264 Data truncated; out of range for column 'f1' at row 8
+Warning 1264 Out of range value adjusted for column 'f1' at row 7
+Warning 1264 Out of range value adjusted for column 'f1' at row 8
insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150);
select * from t1;
f1 f2
@@ -143,3 +143,39 @@ drop table t1;
create table t1 (f float(54));
ERROR 42000: Incorrect column specifier for column 'f'
drop table if exists t1;
+create table t1 (f float(4,3));
+insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
+Warnings:
+Warning 1264 Out of range value adjusted for column 'f' at row 1
+Warning 1264 Out of range value adjusted for column 'f' at row 2
+Warning 1264 Out of range value adjusted for column 'f' at row 3
+Warning 1264 Out of range value adjusted for column 'f' at row 4
+Warning 1264 Out of range value adjusted for column 'f' at row 5
+Warning 1264 Out of range value adjusted for column 'f' at row 6
+select * from t1;
+f
+-9.999
+-9.999
+-9.999
+9.999
+9.999
+9.999
+drop table if exists t1;
+create table t1 (f double(4,3));
+insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
+Warnings:
+Warning 1264 Out of range value adjusted for column 'f' at row 1
+Warning 1264 Out of range value adjusted for column 'f' at row 2
+Warning 1264 Out of range value adjusted for column 'f' at row 3
+Warning 1264 Out of range value adjusted for column 'f' at row 4
+Warning 1264 Out of range value adjusted for column 'f' at row 5
+Warning 1264 Out of range value adjusted for column 'f' at row 6
+select * from t1;
+f
+-9.999
+-9.999
+-9.999
+9.999
+9.999
+9.999
+drop table if exists t1;