Commit 72a8049b authored by unknown's avatar unknown
Browse files

Merge from 4.1 to 5.0


mysql-test/r/loaddata.result:
  Add drop tablea after test case
mysql-test/r/type_decimal.result:
  Update warnings
mysql-test/r/union.result:
  Miss in merge
mysql-test/t/loaddata.test:
  Add drop table after test case
sql/opt_sum.cc:
  Add missing }
sql/sql_load.cc:
  Manual merge
parent 129300f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ select * from t1;
id
0
SET @@SQL_MODE=@OLD_SQL_MODE;
drop table t1;
create table t1 (a int default 100, b int, c varchar(60));
load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b);
select * from t1;
+3 −1
Original line number Diff line number Diff line
@@ -674,9 +674,11 @@ a
drop table t1;
create table t1(a decimal(10,5), b decimal(10,1));
insert into t1 values(123.12345, 123.12345);
Warnings:
Note	1265	Data truncated for column 'b' at row 1
update t1 set b=a;
Warnings:
Warning	1265	Data truncated for column 'b' at row 1
Note	1265	Data truncated for column 'b' at row 1
select * from t1;
a	b
123.12345	123.1
+0 −15
Original line number Diff line number Diff line
@@ -780,21 +780,6 @@ t1 CREATE TABLE `t1` (
  `b` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1,t2;
create table t1 (d decimal(10,1));
create table t2 (d decimal(10,9));
insert into t1 values ("100000000.0");
insert into t2 values ("1.23456780");
create table t3 select * from t2 union select * from t1;
select * from t3;
d
1.234567800
100000000.000000000
show create table t3;
Table	Create Table
t3	CREATE TABLE `t3` (
  `d` decimal(18,9) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1,t2,t3;
create table t1 select 1 union select -1;
select * from t1;
1
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ enable_query_log;
select * from t1;
--exec rm $MYSQL_TEST_DIR/var/tmp/t1
SET @@SQL_MODE=@OLD_SQL_MODE;
drop table t1;

# End of 4.1 tests

+1 −0
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
            ((Item_sum_count*) item)->make_const(count);
            recalc_const_item= 1;
          }
        }
        else
          const_result= 0;
        break;
Loading