mirror of
https://github.com/MariaDB/server.git
synced 2025-10-25 18:38:00 +03:00
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
This commit is contained in:
@@ -134,3 +134,16 @@ test.t1.product Computer TV 2 8 0 0 4.2500 NULL ENUM('Computer','Phone','TV') NO
|
||||
sum(profit) 10 6900 2 4 0 0 1946 2868 ENUM('10','275','600','6900') NOT NULL
|
||||
avg(profit) 10.0000 1380.0000 7 9 0 0 394.6875 570.2003 ENUM('10.0000','68.7500','120.0000','1380.0000') NOT NULL
|
||||
drop table t1,t2;
|
||||
create table t1 (f1 double(10,5), f2 char(10), f3 double(10,5));
|
||||
insert into t1 values (5.999, "5.9999", 5.99999), (9.555, "9.5555", 9.55555);
|
||||
select f1 from t1 procedure analyse(1, 1);
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f1 5.99900 9.55500 7 7 0 0 7.77700 1.77800 FLOAT(4,3) NOT NULL
|
||||
select f2 from t1 procedure analyse(1, 1);
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f2 5.9999 9.5555 6 6 0 0 6.0000 NULL FLOAT(5,4) UNSIGNED NOT NULL
|
||||
select f3 from t1 procedure analyse(1, 1);
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f3 5.99999 9.55555 7 7 0 0 7.77777 1.77778 FLOAT(6,5) NOT NULL
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
|
||||
@@ -1340,3 +1340,15 @@ select a from t1 group by a;
|
||||
a
|
||||
e
|
||||
drop table t1;
|
||||
create table t1(a char(10)) default charset utf8;
|
||||
insert into t1 values ('123'), ('456');
|
||||
explain
|
||||
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where
|
||||
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
|
||||
substr(Z.a,-1) a
|
||||
3 123
|
||||
6 456
|
||||
drop table t1;
|
||||
|
||||
@@ -694,6 +694,18 @@ t1 CREATE TABLE `t1` (
|
||||
`from_unixtime(1) + 0` double(23,6) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
SET NAMES latin1;
|
||||
SET character_set_results = NULL;
|
||||
SHOW VARIABLES LIKE 'character_set_results';
|
||||
Variable_name Value
|
||||
character_set_results
|
||||
CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
|
||||
INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
|
||||
SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
|
||||
fmtddate field2
|
||||
Sep-4 12:00AM abcd
|
||||
DROP TABLE testBug8868;
|
||||
SET NAMES DEFAULT;
|
||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
|
||||
union
|
||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
|
||||
|
||||
@@ -272,3 +272,10 @@ desc t3;
|
||||
Field Type Null Key Default Extra
|
||||
a double 0
|
||||
drop table t1,t2,t3;
|
||||
select 1e-308, 1.00000001e-300, 100000000e-300;
|
||||
1e-308 1.00000001e-300 100000000e-300
|
||||
0 1.00000001e-300 1e-292
|
||||
select 10e307;
|
||||
10e307
|
||||
1e+308
|
||||
End of 4.1 tests
|
||||
|
||||
Reference in New Issue
Block a user