Commit d066e217 authored by gkodinov/kgeorge@magare.gmz's avatar gkodinov/kgeorge@magare.gmz
Browse files

Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt
parents e971b18f 5b67dca4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ functions */
#include <io.h>
#include <malloc.h>

#define BIG_TABLES 1
#define HAVE_SMEM 1

#if defined(_WIN64) || defined(WIN64) 
+1 −1
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ explain t2;
Field	Type	Null	Key	Default	Extra
a	int(11)	YES		NULL	
b	bigint(11)	NO		0	
c	bigint(11)	NO		0	
c	bigint(11) unsigned	NO		0	
d	date	YES		NULL	
e	varchar(1)	NO			
f	datetime	YES		NULL	
+3 −0
Original line number Diff line number Diff line
@@ -922,4 +922,7 @@ ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_gen
select * from t1 where a=if(b<10,_ucs2 0x0062,_ucs2 0x00C0);
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_general_ci,COERCIBLE) for operation '='
drop table t1;
select hex(char(0x41 using ucs2));
hex(char(0x41 using ucs2))
0041
End of 5.0 tests
+40 −2
Original line number Diff line number Diff line
@@ -1538,12 +1538,12 @@ char(53647 using utf8)
я
select char(0xff,0x8f using utf8);
char(0xff,0x8f using utf8)


Warnings:
Warning	1300	Invalid utf8 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8)


Warnings:
Warning	1300	Invalid utf8 character string: 'FF8F'
set sql_mode=traditional;
@@ -1730,3 +1730,41 @@ i
1
н1234567890
DROP TABLE t1, t2;
set sql_mode=traditional;
select hex(char(0xFF using utf8));
hex(char(0xFF using utf8))
NULL
Warnings:
Error	1300	Invalid utf8 character string: 'FF'
select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8))
NULL
Warnings:
Error	1300	Invalid utf8 character string: 'FF'
select hex(_utf8 0x616263FF);
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 X'616263FF');
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 B'001111111111');
ERROR HY000: Invalid utf8 character string: 'FF'
select (_utf8 X'616263FF');
ERROR HY000: Invalid utf8 character string: 'FF'
set sql_mode=default;
select hex(char(0xFF using utf8));
hex(char(0xFF using utf8))

Warnings:
Warning	1300	Invalid utf8 character string: 'FF'
select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8))

Warnings:
Warning	1300	Invalid utf8 character string: 'FF'
select hex(_utf8 0x616263FF);
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 X'616263FF');
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 B'001111111111');
ERROR HY000: Invalid utf8 character string: 'FF'
select (_utf8 X'616263FF');
ERROR HY000: Invalid utf8 character string: 'FF'
+2 −1
Original line number Diff line number Diff line
@@ -326,7 +326,8 @@ id select_type table type possible_keys key key_len ref rows Extra
2	DERIVED	t2	index	PRIMARY	PRIMARY	4	NULL	2	Using where; Using index
drop table t2;
CREATE TABLE `t1` ( `itemid` int(11) NOT NULL default '0', `grpid` varchar(15) NOT NULL default '', `vendor` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `price` decimal(12,2) NOT NULL default '0.00', PRIMARY KEY  (`itemid`,`grpid`,`vendor`,`date_`), KEY `itemid` (`itemid`,`vendor`), KEY `itemid_2` (`itemid`,`date_`));
insert into t1 values (128, 'rozn', 2, now(), 10),(128, 'rozn', 1, now(), 10);
insert into t1 values (128, 'rozn', 2, curdate(), 10),
(128, 'rozn', 1, curdate(), 10);
SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MAX(concat(date_,";",price)), 12) price FROM t1 WHERE itemid=128 AND  grpid='rozn' GROUP BY itemid, grpid, vendor) lastprices;
min	max	avg
10.00	10.00	10
Loading