diff options
author | monty@hundin.mysql.fi <> | 2002-05-16 23:35:09 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-05-16 23:35:09 +0300 |
commit | 0c5c517db61c8d1e0753a310ec38d0c6b41827b2 (patch) | |
tree | cbcb80b627d5f9bc7c0b27150bbdef3cd36d22aa /mysql-test | |
parent | f5ed8784a24f12262bd01be3df63d5c891adf306 (diff) | |
download | mariadb-git-0c5c517db61c8d1e0753a310ec38d0c6b41827b2.tar.gz |
Fixed some compilation problems in last changeset
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_isnull.result | 6 | ||||
-rw-r--r-- | mysql-test/r/join.result | 4 | ||||
-rw-r--r-- | mysql-test/r/show_check.result | 25 | ||||
-rw-r--r-- | mysql-test/r/type_datetime.result | 21 | ||||
-rw-r--r-- | mysql-test/r/type_decimal.result | 156 | ||||
-rw-r--r-- | mysql-test/r/type_float.result | 2 |
6 files changed, 213 insertions, 1 deletions
diff --git a/mysql-test/r/func_isnull.result b/mysql-test/r/func_isnull.result index deaeaaf71c9..20ddc87ee78 100644 --- a/mysql-test/r/func_isnull.result +++ b/mysql-test/r/func_isnull.result @@ -1 +1,7 @@ +drop table if exists t1; +create table t1 (id int auto_increment primary key not null, mydate date not null); +insert into t1 values (0,"2002-05-01"),(0,"2002-05-01"),(0,"2002-05-01"); +flush tables; +select * from t1 where isnull(to_days(mydate)); id mydate +drop table t1; diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index b8ec13e9f50..96113dcdc8b 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -115,6 +115,10 @@ d d SELECT * from t1 WHERE t1.d IS NULL; d 0000-00-00 +SELECT * FROM t1 WHERE 1/0 IS NULL; +d +2001-08-01 +0000-00-00 DROP TABLE t1,t2; CREATE TABLE t1 ( Document_ID varchar(50) NOT NULL default '', diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 50d910564d0..2c32d766a38 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -146,3 +146,28 @@ t1 CREATE TABLE `t1` ( KEY `b` (`b`) ) TYPE=MyISAM drop table t1; +create table t1 (a decimal(9,2), b decimal (9,0), e double(9,2), f double(5,0), h float(3,2), i float(3,0)); +show columns from t1; +Field Type Null Key Default Extra +a decimal(9,2) YES NULL +b decimal(9,0) YES NULL +e double(9,2) YES NULL +f double(5,0) YES NULL +h float(3,2) YES NULL +i float(3,0) YES NULL +drop table t1; +create table t1 (c decimal, d double, f float, r real); +show columns from t1; +Field Type Null Key Default Extra +c decimal(10,0) YES NULL +d double YES NULL +f float YES NULL +r double YES NULL +drop table t1; +create table t1 (c decimal(3,3), d double(3,3), f float(3,3)); +show columns from t1; +Field Type Null Key Default Extra +c decimal(4,3) YES NULL +d double(4,3) YES NULL +f float(4,3) YES NULL +drop table t1; diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 3e13485c872..cae15d4f665 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -57,3 +57,24 @@ select * from t1 where dt='2001-08-14 00:00:00' and dt = if(id=1,'2001-08-14 00 id dt 1 2001-08-14 00:00:00 drop table t1; +CREATE TABLE `t1` ( +`date` datetime NOT NULL default '0000-00-00 00:00:00', +`numfacture` int(6) unsigned NOT NULL default '0', +`expedition` datetime NOT NULL default '0000-00-00 00:00:00', +PRIMARY KEY (`numfacture`), +KEY `date` (`date`), +KEY `expedition` (`expedition`) +) TYPE=MyISAM; +INSERT INTO t1 (expedition) VALUES ('0001-00-00 00:00:00'); +SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; +date numfacture expedition +0000-00-00 00:00:00 0 0001-00-00 00:00:00 +INSERT INTO t1 (numfacture,expedition) VALUES ('1212','0001-00-00 00:00:00'); +SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; +date numfacture expedition +0000-00-00 00:00:00 0 0001-00-00 00:00:00 +0000-00-00 00:00:00 1212 0001-00-00 00:00:00 +EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; +table type possible_keys key key_len ref rows Extra +t1 ref expedition expedition 8 const 1 where used +drop table t1; diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index 9fee88f4bf8..94fa112b57b 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -150,3 +150,159 @@ select * from t1 where minvalue<=-1 and maxvalue>=-1 and datatype_id=16; id datatype_id minvalue maxvalue valuename forecolor backcolor 143 16 -4.9000000000 -0.1000000000 NULL 15774720 drop table t1; +create table t1 (a decimal(10,2)); +insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); +insert into t1 values ("-.1"),("+.1"),(".1"); +insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); +insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +select * from t1; +a +0.00 +-0.00 ++0.00 +01.00 ++01.00 +-01.00 +-0.10 ++0.10 +0.10 +000000001.00 ++00000001.00 +-00000001.00 +111111111.11 +111111111.11 +-11111111.11 +-99999999.99 +999999999.99 +999999999.99 +drop table t1; +create table t1 (a decimal(10,2) unsigned); +insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); +insert into t1 values ("-.1"),("+.1"),(".1"); +insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); +insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +select * from t1; +a +0.00 +0.00 +0.00 +01.00 +01.00 +0.00 +0.00 +0.10 +0.10 +00000001.00 +00000001.00 +0.00 +99999999.99 +99999999.99 +0.00 +0.00 +99999999.99 +99999999.99 +drop table t1; +create table t1 (a decimal(10,2) zerofill); +insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); +insert into t1 values ("-.1"),("+.1"),(".1"); +insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); +insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +select * from t1; +a +00000000.00 +00000000.00 +00000000.00 +00000001.00 +00000001.00 +00000000.00 +00000000.00 +00000000.10 +00000000.10 +00000001.00 +00000001.00 +00000000.00 +99999999.99 +99999999.99 +00000000.00 +00000000.00 +99999999.99 +99999999.99 +drop table t1; +create table t1 (a decimal(10,2)); +insert into t1 values (0.0),(-0.0),(+0.0),(01.0),(+01.0),(-01.0); +insert into t1 values (-.1),(+.1),(.1); +insert into t1 values (00000000000001),(+0000000000001),(-0000000000001); +insert into t1 values (+111111111.11),(111111111.11),(-11111111.11); +insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); +select * from t1; +a +0.00 +-0.00 +0.00 +1.00 +1.00 +-1.00 +-0.10 +0.10 +0.10 +1.00 +1.00 +-1.00 +111111111.11 +111111111.11 +-11111111.11 +-99999999.99 +999999999.99 +999999999.99 +drop table t1; +create table t1 (a decimal); +insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); +select * from t1; +a +-9999999999 +-1 ++1 +01 ++0000000001 +12345678901 +99999999999 +drop table t1; +create table t1 (a decimal unsigned); +insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +select * from t1; +a +0 +0 +1 +01 +0000000001 +1234567890 +9999999999 +drop table t1; +create table t1 (a decimal zerofill); +insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +select * from t1; +a +0000000000 +0000000000 +0000000001 +0000000001 +0000000001 +1234567890 +9999999999 +drop table t1; +create table t1 (a decimal unsigned zerofill); +insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +select * from t1; +a +0000000000 +0000000000 +0000000001 +0000000001 +0000000001 +1234567890 +9999999999 +drop table t1; diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 4dbfa1b9f66..e85bced353a 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -81,7 +81,7 @@ de2 decimal(6,0) YES NULL select,insert,update,references de3 decimal(5,2) YES NULL select,insert,update,references n decimal(10,0) YES NULL select,insert,update,references n2 decimal(8,0) YES NULL select,insert,update,references -n3 decimal(8,6) YES NULL select,insert,update,references +n3 decimal(7,6) YES NULL select,insert,update,references drop table t1; create table t1 (a decimal(7,3) not null, key (a)); insert into t1 values ("0"),("-0.00"),("-0.01"),("-0.002"),("1"); |