From 59004f01f9b1f285e57545afca715e61799840a6 Mon Sep 17 00:00:00 2001 From: "vva@eagle.mysql.r18.ru" <> Date: Tue, 16 Dec 2003 17:55:34 -0400 Subject: fixed restoring of thd->count_cuted_fields in store_val_in_field (fixed #bug 2012) --- mysql-test/t/insert_select.test | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index 17ecb2d5a1f..625f4755a79 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -10,3 +10,34 @@ insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1; insert into t2 (payoutID) SELECT payoutID+10 FROM t1; select * from t2; 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; -- cgit v1.2.1 From d7f6ced15588a570d0366e59dd41e7988250dbd9 Mon Sep 17 00:00:00 2001 From: "vva@eagle.mysql.r18.ru" <> Date: Mon, 12 Jan 2004 22:47:26 -0400 Subject: Fixed Bug #2338 Trigonometric arithmetic problem by fixing optimizer bug with help of 'volatile' keyword --- mysql-test/t/func_math.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 5299897d0f0..42ba8c73f69 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -13,3 +13,14 @@ select pow(10,log10(10)),power(2,4); 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); -- cgit v1.2.1 From 2093624a732c5bec57db3460d2297356e07c4946 Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Fri, 6 Feb 2004 14:28:57 +0300 Subject: Fix for bug #2628 "ALTER TABLE destroys table and reports success" --- mysql-test/t/alter_table.test | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index dbfbd4267d8..cfb4f958372 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -82,3 +82,20 @@ alter table t1 drop i,add i int unsigned not null auto_increment, drop primary k select * 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; -- cgit v1.2.1