Commit 53d2e32b authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint

parents 1e84e31c 41c25e01
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2629,7 +2629,7 @@ com_connect(String *buffer, char *line)
  bzero(buff, sizeof(buff));
  if (buffer)
  {
    strmov(buff, line);
    strmake(buff, line, sizeof(buff) - 1);
    tmp= get_arg(buff, 0);
    if (tmp && *tmp)
    {
@@ -2743,7 +2743,7 @@ com_use(String *buffer __attribute__((unused)), char *line)
  char *tmp, buff[FN_REFLEN + 1];

  bzero(buff, sizeof(buff));
  strmov(buff, line);
  strmake(buff, line, sizeof(buff) - 1);
  tmp= get_arg(buff, 0);
  if (!tmp || !*tmp)
  {
+13 −0
Original line number Diff line number Diff line
@@ -1352,3 +1352,16 @@ select database();
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;
+12 −0
Original line number Diff line number Diff line
@@ -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);
+7 −0
Original line number Diff line number Diff line
@@ -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
+12 −0
Original line number Diff line number Diff line
@@ -1087,5 +1087,17 @@ create database имя_базы_в_кодировке_утф8_длиной_бо
use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
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
Loading