5.3 merge
This commit is contained in:
commit
ff2e82f4a1
@ -3646,7 +3646,8 @@ static void dump_table(char *table, char *db)
|
|||||||
field->type == MYSQL_TYPE_BLOB ||
|
field->type == MYSQL_TYPE_BLOB ||
|
||||||
field->type == MYSQL_TYPE_LONG_BLOB ||
|
field->type == MYSQL_TYPE_LONG_BLOB ||
|
||||||
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
|
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
|
||||||
field->type == MYSQL_TYPE_TINY_BLOB)) ? 1 : 0;
|
field->type == MYSQL_TYPE_TINY_BLOB ||
|
||||||
|
field->type == MYSQL_TYPE_GEOMETRY)) ? 1 : 0;
|
||||||
if (extended_insert && !opt_xml)
|
if (extended_insert && !opt_xml)
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
@ -2253,7 +2253,7 @@ EXPLAIN EXTENDED SELECT a FROM v1 WHERE a > 100 ORDER BY b;
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 4 AS `a` from dual where (4 > 100) order by 1
|
Note 1003 select 4 AS `a` from dual where 0 order by 1
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE IF NOT EXISTS `galleries` (
|
CREATE TABLE IF NOT EXISTS `galleries` (
|
||||||
|
@ -102,7 +102,6 @@ a
|
|||||||
foo
|
foo
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1259 ZLIB: Input data corrupted
|
Warning 1259 ZLIB: Input data corrupted
|
||||||
Warning 1259 ZLIB: Input data corrupted
|
|
||||||
explain select *, uncompress(a) from t1;
|
explain select *, uncompress(a) from t1;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 system NULL NULL NULL NULL 1
|
1 SIMPLE t1 system NULL NULL NULL NULL 1
|
||||||
|
@ -52,7 +52,7 @@ explain extended select * from t1 where xxx regexp('is a test of some long text
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 'this is a test of some long text to see what happens' AS `xxx` from dual where ('this is a test of some long text to see what happens' regexp 'is a test of some long text to')
|
Note 1003 select 'this is a test of some long text to see what happens' AS `xxx` from dual where 1
|
||||||
select * from t1 where xxx regexp('is a test of some long text to ');
|
select * from t1 where xxx regexp('is a test of some long text to ');
|
||||||
xxx
|
xxx
|
||||||
this is a test of some long text to see what happens
|
this is a test of some long text to see what happens
|
||||||
|
@ -1153,7 +1153,6 @@ str num
|
|||||||
notnumber 0
|
notnumber 0
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'notnumber'
|
Warning 1292 Truncated incorrect DOUBLE value: 'notnumber'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'notnumber'
|
|
||||||
SELECT * FROM t1, t2 WHERE num=substring(str from 1 for 6);
|
SELECT * FROM t1, t2 WHERE num=substring(str from 1 for 6);
|
||||||
str num
|
str num
|
||||||
notnumber 0
|
notnumber 0
|
||||||
|
@ -452,3 +452,6 @@ ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0 -3.0,
|
|||||||
0.0 -3.0
|
0.0 -3.0
|
||||||
))' ),
|
))' ),
|
||||||
136
|
136
|
||||||
|
select astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1));
|
||||||
|
astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1))
|
||||||
|
GEOMETRYCOLLECTION EMPTY
|
||||||
|
@ -1311,7 +1311,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||||
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
|
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where ((coalesce(1,NULL),3) in ((1,3),(2,2)))
|
Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where 1
|
||||||
SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2
|
SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2
|
||||||
WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
|
WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
|
||||||
f1 f2 f3 f1 f2
|
f1 f2 f3 f1 f2
|
||||||
|
@ -1322,7 +1322,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||||
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
|
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where ((coalesce(1,NULL),3) in ((1,3),(2,2)))
|
Note 1003 select 1 AS `f1`,NULL AS `f2`,3 AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where 1
|
||||||
SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2
|
SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2
|
||||||
WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
|
WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
|
||||||
f1 f2 f3 f1 f2
|
f1 f2 f3 f1 f2
|
||||||
|
@ -5264,6 +5264,20 @@ slow_log CREATE TABLE `slow_log` (
|
|||||||
SET @@global.log_output= @old_log_output_state;
|
SET @@global.log_output= @old_log_output_state;
|
||||||
SET @@global.slow_query_log= @old_slow_query_log_state;
|
SET @@global.slow_query_log= @old_slow_query_log_state;
|
||||||
SET @@global.general_log= @old_general_log_state;
|
SET @@global.general_log= @old_general_log_state;
|
||||||
|
# MDEV-5481 mysqldump fails to dump geometry types properly
|
||||||
|
create table t1 (g GEOMETRY) CHARSET koi8r;
|
||||||
|
create table t2 (g GEOMETRY) CHARSET koi8r;
|
||||||
|
insert into t1 values (point(1,1)), (point(2,2));
|
||||||
|
##################################################
|
||||||
|
\0\0\0\0\0\0\0\0\0\0\0\0\0ð?\0\0\0\0\0\0ð?
|
||||||
|
\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@
|
||||||
|
##################################################
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET koi8r;
|
||||||
|
select astext(g) from t2;
|
||||||
|
astext(g)
|
||||||
|
POINT(1 1)
|
||||||
|
POINT(2 2)
|
||||||
|
drop table t1, t2;
|
||||||
#
|
#
|
||||||
# End of 5.1 tests
|
# End of 5.1 tests
|
||||||
#
|
#
|
||||||
|
@ -5315,7 +5315,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0;
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0)
|
Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SELECT * FROM mysql.time_zone
|
SELECT * FROM mysql.time_zone
|
||||||
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
|
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
|
||||||
@ -5338,7 +5338,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
|
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
|
||||||
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
|
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1)
|
Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8)
|
||||||
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
|
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
|
||||||
WHERE 1 IS NULL OR b < 33 AND b = c;
|
WHERE 1 IS NULL OR b < 33 AND b = c;
|
||||||
a b c
|
a b c
|
||||||
@ -5462,7 +5462,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
|
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0))
|
Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6))
|
||||||
INSERT INTO t1 VALUES (3,1,6);
|
INSERT INTO t1 VALUES (3,1,6);
|
||||||
SELECT * FROM t1, t2
|
SELECT * FROM t1, t2
|
||||||
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
|
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
|
||||||
|
@ -5326,7 +5326,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0;
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0)
|
Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SELECT * FROM mysql.time_zone
|
SELECT * FROM mysql.time_zone
|
||||||
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
|
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
|
||||||
@ -5349,7 +5349,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
|
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
|
||||||
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
|
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1)
|
Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8)
|
||||||
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
|
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
|
||||||
WHERE 1 IS NULL OR b < 33 AND b = c;
|
WHERE 1 IS NULL OR b < 33 AND b = c;
|
||||||
a b c
|
a b c
|
||||||
@ -5473,7 +5473,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
|
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0))
|
Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6))
|
||||||
INSERT INTO t1 VALUES (3,1,6);
|
INSERT INTO t1 VALUES (3,1,6);
|
||||||
SELECT * FROM t1, t2
|
SELECT * FROM t1, t2
|
||||||
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
|
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
|
||||||
|
@ -5315,7 +5315,7 @@ SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0;
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where (0 <> 0)
|
Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SELECT * FROM mysql.time_zone
|
SELECT * FROM mysql.time_zone
|
||||||
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
|
WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1)
|
||||||
@ -5338,7 +5338,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
|
1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
|
||||||
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
|
1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1)
|
Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where (`test`.`t2`.`c` = 8)
|
||||||
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
|
SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
|
||||||
WHERE 1 IS NULL OR b < 33 AND b = c;
|
WHERE 1 IS NULL OR b < 33 AND b = c;
|
||||||
a b c
|
a b c
|
||||||
@ -5462,7 +5462,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
|
1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or 0))
|
Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6))
|
||||||
INSERT INTO t1 VALUES (3,1,6);
|
INSERT INTO t1 VALUES (3,1,6);
|
||||||
SELECT * FROM t1, t2
|
SELECT * FROM t1, t2
|
||||||
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
|
WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL );
|
||||||
|
@ -561,7 +561,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
||||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
|
Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (a int(1));
|
CREATE TABLE t1 (a int(1));
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
@ -6098,7 +6098,7 @@ FROM t1 AS sq4_alias1
|
|||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
sq4_alias1.col_varchar_key = @var3;
|
sq4_alias1.col_varchar_key = @var3;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
|
||||||
SELECT @var3:=12, sq4_alias1.*
|
SELECT @var3:=12, sq4_alias1.*
|
||||||
FROM t1 AS sq4_alias1
|
FROM t1 AS sq4_alias1
|
||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
|
@ -46,7 +46,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
|
Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
|
||||||
Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where ('2007-04-25 18:30:22' = 0)
|
Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where 0
|
||||||
select * from t1
|
select * from t1
|
||||||
where id in (select id from t1 as x1 where (t1.cur_date is null));
|
where id in (select id from t1 as x1 where (t1.cur_date is null));
|
||||||
id cur_date
|
id cur_date
|
||||||
@ -57,7 +57,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
|
Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
|
||||||
Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where ('2007-04-25' = 0)
|
Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where 0
|
||||||
select * from t2
|
select * from t2
|
||||||
where id in (select id from t2 as x1 where (t2.cur_date is null));
|
where id in (select id from t2 as x1 where (t2.cur_date is null));
|
||||||
id cur_date
|
id cur_date
|
||||||
|
@ -568,7 +568,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
||||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
|
Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (a int(1));
|
CREATE TABLE t1 (a int(1));
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
@ -6097,7 +6097,7 @@ FROM t1 AS sq4_alias1
|
|||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
sq4_alias1.col_varchar_key = @var3;
|
sq4_alias1.col_varchar_key = @var3;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
|
||||||
SELECT @var3:=12, sq4_alias1.*
|
SELECT @var3:=12, sq4_alias1.*
|
||||||
FROM t1 AS sq4_alias1
|
FROM t1 AS sq4_alias1
|
||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
|
@ -564,7 +564,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
||||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
|
Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (a int(1));
|
CREATE TABLE t1 (a int(1));
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
@ -6093,7 +6093,7 @@ FROM t1 AS sq4_alias1
|
|||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
sq4_alias1.col_varchar_key = @var3;
|
sq4_alias1.col_varchar_key = @var3;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
|
||||||
SELECT @var3:=12, sq4_alias1.*
|
SELECT @var3:=12, sq4_alias1.*
|
||||||
FROM t1 AS sq4_alias1
|
FROM t1 AS sq4_alias1
|
||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
|
@ -567,7 +567,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
||||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
|
Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (a int(1));
|
CREATE TABLE t1 (a int(1));
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
@ -6104,7 +6104,7 @@ FROM t1 AS sq4_alias1
|
|||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
sq4_alias1.col_varchar_key = @var3;
|
sq4_alias1.col_varchar_key = @var3;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
|
||||||
SELECT @var3:=12, sq4_alias1.*
|
SELECT @var3:=12, sq4_alias1.*
|
||||||
FROM t1 AS sq4_alias1
|
FROM t1 AS sq4_alias1
|
||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
|
@ -564,7 +564,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
|
||||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 3 AS `numreponse` from `test`.`t1` where (1 = '1')
|
Note 1003 select 3 AS `numreponse` from `test`.`t1` where 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (a int(1));
|
CREATE TABLE t1 (a int(1));
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
@ -6093,7 +6093,7 @@ FROM t1 AS sq4_alias1
|
|||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
sq4_alias1.col_varchar_key = @var3;
|
sq4_alias1.col_varchar_key = @var3;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found
|
||||||
SELECT @var3:=12, sq4_alias1.*
|
SELECT @var3:=12, sq4_alias1.*
|
||||||
FROM t1 AS sq4_alias1
|
FROM t1 AS sq4_alias1
|
||||||
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR
|
||||||
|
@ -2793,6 +2793,22 @@ mysql
|
|||||||
information_schema
|
information_schema
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
INSERT INTO t1 VALUES (2),(3);
|
||||||
|
CREATE TABLE t2 (b INT);
|
||||||
|
INSERT INTO t2 VALUES (8),(9);
|
||||||
|
CREATE TABLE t3 (c INT, INDEX(c));
|
||||||
|
INSERT INTO t2 VALUES (5),(6);
|
||||||
|
PREPARE stmt FROM
|
||||||
|
"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )";
|
||||||
|
EXECUTE stmt;
|
||||||
|
a
|
||||||
|
EXECUTE stmt;
|
||||||
|
a
|
||||||
|
DROP TABLE t1,t2,t3;
|
||||||
|
#
|
||||||
# MySQL Bug#13340270: assertion table->sort.record_pointers == __null
|
# MySQL Bug#13340270: assertion table->sort.record_pointers == __null
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
|
@ -2807,6 +2807,22 @@ information_schema
|
|||||||
mysql
|
mysql
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
INSERT INTO t1 VALUES (2),(3);
|
||||||
|
CREATE TABLE t2 (b INT);
|
||||||
|
INSERT INTO t2 VALUES (8),(9);
|
||||||
|
CREATE TABLE t3 (c INT, INDEX(c));
|
||||||
|
INSERT INTO t2 VALUES (5),(6);
|
||||||
|
PREPARE stmt FROM
|
||||||
|
"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )";
|
||||||
|
EXECUTE stmt;
|
||||||
|
a
|
||||||
|
EXECUTE stmt;
|
||||||
|
a
|
||||||
|
DROP TABLE t1,t2,t3;
|
||||||
|
#
|
||||||
# MySQL Bug#13340270: assertion table->sort.record_pointers == __null
|
# MySQL Bug#13340270: assertion table->sort.record_pointers == __null
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
|
@ -519,7 +519,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
|
Note 1276 Field or reference 'test.t1.cur_date' of SELECT #2 was resolved in SELECT #1
|
||||||
Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where ('2007-04-25 18:30:22' = 0)
|
Note 1003 select 1 AS `id`,'2007-04-25 18:30:22' AS `cur_date` from (dual) where 0
|
||||||
select * from t1
|
select * from t1
|
||||||
where id in (select id from t1 as x1 where (t1.cur_date is null));
|
where id in (select id from t1 as x1 where (t1.cur_date is null));
|
||||||
id cur_date
|
id cur_date
|
||||||
@ -530,7 +530,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
|
Note 1276 Field or reference 'test.t2.cur_date' of SELECT #2 was resolved in SELECT #1
|
||||||
Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where ('2007-04-25' = 0)
|
Note 1003 select 1 AS `id`,'2007-04-25' AS `cur_date` from (dual) where 0
|
||||||
select * from t2
|
select * from t2
|
||||||
where id in (select id from t2 as x1 where (t2.cur_date is null));
|
where id in (select id from t2 as x1 where (t2.cur_date is null));
|
||||||
id cur_date
|
id cur_date
|
||||||
|
@ -4417,7 +4417,7 @@ WHERE f1<>0 OR f2<>0 AND f4='v' AND (f2<>0 OR f3<>0 AND f5<>0 OR f4 LIKE '%b%');
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 'r' AS `f4` from dual where (20 <> 0)
|
Note 1003 select 'r' AS `f4` from dual where 1
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
@ -325,3 +325,6 @@ SELECT ST_NUMPOINTS(ST_EXTERIORRING(ST_BUFFER( POLYGONFROMTEXT( 'POLYGON( ( 0.0
|
|||||||
0.0 -3.0
|
0.0 -3.0
|
||||||
))' ), 3 )));
|
))' ), 3 )));
|
||||||
|
|
||||||
|
# MDEV-5615 crash in Gcalc_function::add_operation
|
||||||
|
select astext(buffer(st_linestringfromwkb(linestring(point(-1,1), point(-1,-2))),-1));
|
||||||
|
|
||||||
|
@ -2437,6 +2437,21 @@ SET @@global.log_output= @old_log_output_state;
|
|||||||
SET @@global.slow_query_log= @old_slow_query_log_state;
|
SET @@global.slow_query_log= @old_slow_query_log_state;
|
||||||
SET @@global.general_log= @old_general_log_state;
|
SET @@global.general_log= @old_general_log_state;
|
||||||
|
|
||||||
|
--echo # MDEV-5481 mysqldump fails to dump geometry types properly
|
||||||
|
|
||||||
|
create table t1 (g GEOMETRY) CHARSET koi8r;
|
||||||
|
create table t2 (g GEOMETRY) CHARSET koi8r;
|
||||||
|
insert into t1 values (point(1,1)), (point(2,2));
|
||||||
|
--exec $MYSQL_DUMP --hex-blob --character-sets-dir=$MYSQL_SHAREDIR/charsets --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET koi8r
|
||||||
|
--remove_file $file
|
||||||
|
select astext(g) from t2;
|
||||||
|
drop table t1, t2;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 5.1 tests
|
--echo # End of 5.1 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -2489,6 +2489,24 @@ INSERT INTO t1 VALUES ('mysql'),('information_schema');
|
|||||||
SELECT * FROM t1 WHERE db IN (SELECT `SCHEMA_NAME` FROM information_schema.SCHEMATA);
|
SELECT * FROM t1 WHERE db IN (SELECT `SCHEMA_NAME` FROM information_schema.SCHEMATA);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
INSERT INTO t1 VALUES (2),(3);
|
||||||
|
|
||||||
|
CREATE TABLE t2 (b INT);
|
||||||
|
INSERT INTO t2 VALUES (8),(9);
|
||||||
|
|
||||||
|
CREATE TABLE t3 (c INT, INDEX(c));
|
||||||
|
INSERT INTO t2 VALUES (5),(6);
|
||||||
|
|
||||||
|
PREPARE stmt FROM
|
||||||
|
"SELECT * FROM t1 WHERE ( 9, 5 ) IN ( SELECT b, COUNT(*) FROM t2 WHERE 1 IN ( SELECT MIN(c) FROM t3 ) )";
|
||||||
|
EXECUTE stmt;
|
||||||
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
DROP TABLE t1,t2,t3;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MySQL Bug#13340270: assertion table->sort.record_pointers == __null
|
--echo # MySQL Bug#13340270: assertion table->sort.record_pointers == __null
|
||||||
|
@ -424,6 +424,84 @@ static uchar *read_buffpek_from_file(IO_CACHE *buffpek_pointers, uint count,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
|
|
||||||
|
/* Buffer where record is returned */
|
||||||
|
char dbug_print_row_buff[512];
|
||||||
|
|
||||||
|
/* Temporary buffer for printing a column */
|
||||||
|
char dbug_print_row_buff_tmp[512];
|
||||||
|
|
||||||
|
/*
|
||||||
|
Print table's current row into a buffer and return a pointer to it.
|
||||||
|
|
||||||
|
This is intended to be used from gdb:
|
||||||
|
|
||||||
|
(gdb) p dbug_print_table_row(table)
|
||||||
|
$33 = "SUBQUERY2_t1(col_int_key,col_varchar_nokey)=(7,c)"
|
||||||
|
(gdb)
|
||||||
|
|
||||||
|
Only columns in table->read_set are printed
|
||||||
|
*/
|
||||||
|
|
||||||
|
const char* dbug_print_table_row(TABLE *table)
|
||||||
|
{
|
||||||
|
Field **pfield;
|
||||||
|
String tmp(dbug_print_row_buff_tmp,
|
||||||
|
sizeof(dbug_print_row_buff_tmp),&my_charset_bin);
|
||||||
|
|
||||||
|
String output(dbug_print_row_buff, sizeof(dbug_print_row_buff),
|
||||||
|
&my_charset_bin);
|
||||||
|
|
||||||
|
output.length(0);
|
||||||
|
output.append(table->alias);
|
||||||
|
output.append("(");
|
||||||
|
bool first= true;
|
||||||
|
|
||||||
|
for (pfield= table->field; *pfield ; pfield++)
|
||||||
|
{
|
||||||
|
if (table->read_set && !bitmap_is_set(table->read_set, (*pfield)->field_index))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (first)
|
||||||
|
first= false;
|
||||||
|
else
|
||||||
|
output.append(",");
|
||||||
|
|
||||||
|
output.append((*pfield)->field_name? (*pfield)->field_name: "NULL");
|
||||||
|
}
|
||||||
|
|
||||||
|
output.append(")=(");
|
||||||
|
|
||||||
|
first= true;
|
||||||
|
for (pfield= table->field; *pfield ; pfield++)
|
||||||
|
{
|
||||||
|
Field *field= *pfield;
|
||||||
|
|
||||||
|
if (table->read_set && !bitmap_is_set(table->read_set, (*pfield)->field_index))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (first)
|
||||||
|
first= false;
|
||||||
|
else
|
||||||
|
output.append(",");
|
||||||
|
|
||||||
|
if (field->is_null())
|
||||||
|
output.append("NULL");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (field->type() == MYSQL_TYPE_BIT)
|
||||||
|
(void) field->val_int_as_str(&tmp, 1);
|
||||||
|
else
|
||||||
|
field->val_str(&tmp);
|
||||||
|
output.append(tmp.ptr(), tmp.length());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
output.append(")");
|
||||||
|
|
||||||
|
return output.c_ptr_safe();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Print a text, SQL-like record representation into dbug trace.
|
Print a text, SQL-like record representation into dbug trace.
|
||||||
|
|
||||||
@ -472,6 +550,7 @@ static void dbug_print_record(TABLE *table, bool print_rowid)
|
|||||||
fprintf(DBUG_FILE, "\n");
|
fprintf(DBUG_FILE, "\n");
|
||||||
DBUG_UNLOCK_FILE;
|
DBUG_UNLOCK_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3406,6 +3406,7 @@ public:
|
|||||||
void cleanup()
|
void cleanup()
|
||||||
{
|
{
|
||||||
null_ref_table= NULL;
|
null_ref_table= NULL;
|
||||||
|
item_equal= NULL;
|
||||||
Item_direct_ref::cleanup();
|
Item_direct_ref::cleanup();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -859,7 +859,7 @@ String *Item_func_spatial_operation::val_str(String *str_value)
|
|||||||
str_value->length(0);
|
str_value->length(0);
|
||||||
str_value->q_append(srid);
|
str_value->q_append(srid);
|
||||||
|
|
||||||
if (!Geometry::create_from_opresult(&buffer1, str_value, res_receiver))
|
if (Geometry::create_from_opresult(&buffer1, str_value, res_receiver))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
@ -1116,6 +1116,8 @@ int Item_func_buffer::Transporter::start_line()
|
|||||||
{
|
{
|
||||||
if (buffer_op == Gcalc_function::op_difference)
|
if (buffer_op == Gcalc_function::op_difference)
|
||||||
{
|
{
|
||||||
|
if (m_fn->reserve_op_buffer(1))
|
||||||
|
return 1;
|
||||||
m_fn->add_operation(Gcalc_function::op_false, 0);
|
m_fn->add_operation(Gcalc_function::op_false, 0);
|
||||||
skip_line= TRUE;
|
skip_line= TRUE;
|
||||||
return 0;
|
return 0;
|
||||||
@ -1317,7 +1319,7 @@ String *Item_func_buffer::val_str(String *str_value)
|
|||||||
str_value->length(0);
|
str_value->length(0);
|
||||||
str_value->q_append(srid);
|
str_value->q_append(srid);
|
||||||
|
|
||||||
if (!Geometry::create_from_opresult(&buffer, str_value, res_receiver))
|
if (Geometry::create_from_opresult(&buffer, str_value, res_receiver))
|
||||||
goto mem_error;
|
goto mem_error;
|
||||||
|
|
||||||
null_value= 0;
|
null_value= 0;
|
||||||
|
@ -5276,6 +5276,7 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
|
|||||||
if (!(*join_where)->fixed)
|
if (!(*join_where)->fixed)
|
||||||
(*join_where)->fix_fields(join->thd, join_where);
|
(*join_where)->fix_fields(join->thd, join_where);
|
||||||
}
|
}
|
||||||
|
table->table->maybe_null= test(join->mixed_implicit_grouping);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((nested_join= table->nested_join))
|
if ((nested_join= table->nested_join))
|
||||||
|
@ -302,7 +302,8 @@ int Geometry::create_from_opresult(Geometry_buffer *g_buf,
|
|||||||
|
|
||||||
res->q_append((char) wkb_ndr);
|
res->q_append((char) wkb_ndr);
|
||||||
res->q_append(geom_type);
|
res->q_append(geom_type);
|
||||||
return obj->init_from_opresult(res, rr.result(), rr.length());
|
return obj->init_from_opresult(res, rr.result(), rr.length()) == 0 &&
|
||||||
|
rr.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +83,8 @@ public:
|
|||||||
{
|
{
|
||||||
start= start_arg;
|
start= start_arg;
|
||||||
end= end_arg;
|
end= end_arg;
|
||||||
TRASH(start, end - start);
|
if (end != start)
|
||||||
|
TRASH(start, end - start);
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,7 +663,7 @@ JOIN::prepare(Item ***rref_pointer_array,
|
|||||||
aggregate functions in the SELECT list is a MySQL exptenstion that
|
aggregate functions in the SELECT list is a MySQL exptenstion that
|
||||||
is allowed only if the ONLY_FULL_GROUP_BY sql mode is not set.
|
is allowed only if the ONLY_FULL_GROUP_BY sql mode is not set.
|
||||||
*/
|
*/
|
||||||
bool mixed_implicit_grouping= false;
|
mixed_implicit_grouping= false;
|
||||||
if ((~thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) &&
|
if ((~thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) &&
|
||||||
select_lex->with_sum_func && !group_list)
|
select_lex->with_sum_func && !group_list)
|
||||||
{
|
{
|
||||||
@ -702,7 +702,7 @@ JOIN::prepare(Item ***rref_pointer_array,
|
|||||||
Note: this loop doesn't touch tables inside merged semi-joins, because
|
Note: this loop doesn't touch tables inside merged semi-joins, because
|
||||||
subquery-to-semijoin conversion has not been done yet. This is intended.
|
subquery-to-semijoin conversion has not been done yet. This is intended.
|
||||||
*/
|
*/
|
||||||
if (mixed_implicit_grouping)
|
if (mixed_implicit_grouping && tbl->table)
|
||||||
tbl->table->maybe_null= 1;
|
tbl->table->maybe_null= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3603,6 +3603,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
|
|||||||
join->impossible_where= false;
|
join->impossible_where= false;
|
||||||
if (conds && const_count)
|
if (conds && const_count)
|
||||||
{
|
{
|
||||||
|
conds->update_used_tables();
|
||||||
conds= remove_eq_conds(join->thd, conds, &join->cond_value);
|
conds= remove_eq_conds(join->thd, conds, &join->cond_value);
|
||||||
join->select_lex->where= conds;
|
join->select_lex->where= conds;
|
||||||
if (join->cond_value == Item::COND_FALSE)
|
if (join->cond_value == Item::COND_FALSE)
|
||||||
|
@ -1129,7 +1129,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
JOIN *tmp_join;
|
JOIN *tmp_join;
|
||||||
ROLLUP rollup; ///< Used with rollup
|
ROLLUP rollup; ///< Used with rollup
|
||||||
|
|
||||||
|
bool mixed_implicit_grouping;
|
||||||
bool select_distinct; ///< Set if SELECT DISTINCT
|
bool select_distinct; ///< Set if SELECT DISTINCT
|
||||||
/**
|
/**
|
||||||
If we have the GROUP BY statement in the query,
|
If we have the GROUP BY statement in the query,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user