diff options
author | konstantin@mysql.com <> | 2004-02-06 15:23:41 +0300 |
---|---|---|
committer | konstantin@mysql.com <> | 2004-02-06 15:23:41 +0300 |
commit | 2a4cfe8b4f09b97133893fa5423c4cf2ce589ade (patch) | |
tree | 7230fe81c62fa6a2bc488216ab3775d11795f3a5 /mysql-test/t | |
parent | 650580698f7f473b1ccb5a520a17fc8b269c7c9f (diff) | |
parent | 2093624a732c5bec57db3460d2297356e07c4946 (diff) | |
download | mariadb-git-2a4cfe8b4f09b97133893fa5423c4cf2ce589ade.tar.gz |
merge 3.23 -> 4.0, 2003/02/06
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/alter_table.test | 17 | ||||
-rw-r--r-- | mysql-test/t/func_math.test | 11 | ||||
-rw-r--r-- | mysql-test/t/insert_select.test | 29 |
3 files changed, 57 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index d438f2d5825..1937cdbe985 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -204,3 +204,20 @@ LOCK TABLES t1 WRITE; ALTER TABLE t1 DISABLE KEYS; SHOW INDEX FROM t1; DROP TABLE t1; +# +# Bug #2628: 'alter table t1 rename mysqltest.t1' silently drops mysqltest.t1 +# if it exists +# +create table t1 (name char(15)); +insert into t1 (name) values ("current"); +create database mysqltest; +create table mysqltest.t1 (name char(15)); +insert into mysqltest.t1 (name) values ("mysqltest"); +select * from t1; +select * from mysqltest.t1; +--error 1050 +alter table t1 rename mysqltest.t1; +select * from t1; +select * from mysqltest.t1; +drop table t1; +drop database mysqltest; diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index bd125dafd53..2de692d4389 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -17,3 +17,14 @@ set @@rand_seed1=10000000,@@rand_seed2=1000000; select rand(999999),rand(); select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1); select degrees(pi()),radians(360); + +# +# Bug #2338 Trignometric arithmatic problems +# + +SELECT ACOS(1.0); +SELECT ASIN(1.0); +SELECT ACOS(0.2*5.0); +SELECT ACOS(0.5*2.0); +SELECT ASIN(0.8+0.2); +SELECT ASIN(1.2-0.2); diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index 5c63f3b3bb7..3a8118f7fff 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -132,3 +132,32 @@ CREATE TABLE t2 ( USID INTEGER UNSIGNED AUTO_INCREMENT, ServerID TINYINT UNSIGNE INSERT INTO t1 VALUES (39,42,'Access-Granted','46','491721000045',2130706433,17690,NULL,NULL,'Localnet','491721000045','49172200000',754974766,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2003-07-18 00:11:21',NULL,NULL,20030718001121); INSERT INTO t2 SELECT USID, ServerID, State, SessionID, User, NASAddr, NASPort, NASPortType, ConnectSpeed, CarrierType, CallingStationID, CalledStationID, AssignedAddr, SessionTime, PacketsIn, OctetsIn, PacketsOut, OctetsOut, TerminateCause, UnauthTime, AccessRequestTime, AcctStartTime, AcctLastTime, LastModification from t1 LIMIT 1; drop table t1,t2; +# Another problem from Bug #2012 +# + +CREATE TABLE t1( + Month date NOT NULL, + Type tinyint(3) unsigned NOT NULL auto_increment, + Field int(10) unsigned NOT NULL, + Count int(10) unsigned NOT NULL, + UNIQUE KEY Month (Month,Type,Field) +); + +insert into t1 Values +(20030901, 1, 1, 100), +(20030901, 1, 2, 100), +(20030901, 2, 1, 100), +(20030901, 2, 2, 100), +(20030901, 3, 1, 100); + +select * from t1; + +Select null, Field, Count From t1 Where Month=20030901 and Type=2; + +create table t2(No int not null, Field int not null, Count int not null); + +insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; + +select * from t2; + +drop table t1, t2; |