mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint mysql-test/r/func_time.result: Auto merged mysql-test/t/ctype_utf8.test: Auto merged mysql-test/t/func_time.test: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_func.h: Auto merged sql/item_strfunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_string.cc: Auto merged strings/strtod.c: Auto merged client/mysql.cc: Manual merge. mysql-test/r/ctype_utf8.result: Manual merge.
This commit is contained in:
@ -1353,6 +1353,18 @@ database()
|
||||
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
|
||||
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
|
||||
use test;
|
||||
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;
|
||||
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
|
||||
SELECT id FROM t1;
|
||||
|
@ -890,6 +890,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);
|
||||
|
@ -1086,6 +1086,17 @@ select database();
|
||||
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
|
||||
use test;
|
||||
|
||||
#
|
||||
# Bug #20204: "order by" changes the results returned
|
||||
#
|
||||
|
||||
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;
|
||||
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
@ -446,6 +446,25 @@ create table t1 select now() - now(), curtime() - curtime(),
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# 21913: DATE_FORMAT() Crashes mysql server if I use it through
|
||||
# mysql-connector-j driver.
|
||||
#
|
||||
|
||||
SET NAMES latin1;
|
||||
SET character_set_results = NULL;
|
||||
SHOW VARIABLES LIKE '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;
|
||||
|
||||
DROP TABLE testBug8868;
|
||||
|
||||
SET NAMES DEFAULT;
|
||||
|
||||
|
||||
#
|
||||
# Bug #19844 time_format in Union truncates values
|
||||
#
|
||||
|
Reference in New Issue
Block a user