mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Some of the recently pushed prepared statements
tests were disabled due to failures caused by floating point conversion issues on optimized builds). mysql-test/include/ps_conv.inc: Disable some of the tests for the test suite to pass on an optimized build (floating point issues...). mysql-test/include/ps_query.inc: Disable some of the tests for the test suite to pass on an optimized build (floating point issues...). mysql-test/r/ps_2myisam.result: Fix test results. mysql-test/r/ps_3innodb.result: Fix test results. mysql-test/r/ps_4heap.result: Fix test results. mysql-test/r/ps_5merge.result: Fix test results. mysql-test/r/ps_6bdb.result: Fix test results. mysql-test/r/ps_7ndb.result: Fix test results.
This commit is contained in:
@ -908,53 +908,11 @@ FROM t9,
|
||||
(select c25 x, c32 y from t2) tt WHERE x = c25 ' ;
|
||||
prepare stmt1 from @stmt ;
|
||||
execute stmt1 ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def scalar_s 5 21 7 Y 32768 4 8
|
||||
def exists_s 8 1 1 N 32769 0 8
|
||||
def in_s 8 21 1 Y 32768 0 8
|
||||
def in_row_s 8 21 1 Y 32768 0 8
|
||||
scalar_s exists_s in_s in_row_s
|
||||
2.0000 0 1 0
|
||||
18.0000 1 0 1
|
||||
2.0000 0 1 0
|
||||
18.0000 1 0 1
|
||||
execute stmt1 ;
|
||||
scalar_s exists_s in_s in_row_s
|
||||
2.0000 0 1 0
|
||||
18.0000 1 0 1
|
||||
2.0000 0 1 0
|
||||
18.0000 1 0 1
|
||||
set @stmt= concat('explain ',@stmt);
|
||||
prepare stmt1 from @stmt ;
|
||||
execute stmt1 ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def id 8 3 1 N 32801 0 8
|
||||
def select_type 253 19 18 N 1 31 8
|
||||
def table 253 64 10 N 1 31 8
|
||||
def type 253 10 3 N 1 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 8 3 0 Y 32800 0 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 N 32801 0 8
|
||||
def Extra 253 255 44 N 1 31 8
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t9 ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 2 Using where
|
||||
6 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary; Using filesort
|
||||
execute stmt1 ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t9 ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 2 Using where
|
||||
6 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary; Using filesort
|
||||
set @stmt= ' SELECT
|
||||
(SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2
|
||||
GROUP BY t9.c15 LIMIT 1) as scalar_s,
|
||||
@ -977,56 +935,14 @@ set @arg09= 40e-1 ;
|
||||
prepare stmt1 from @stmt ;
|
||||
execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
|
||||
@arg07, @arg08, @arg09 ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def scalar_s 5 23 2 Y 32768 31 8
|
||||
def exists_s 8 1 1 N 32769 0 8
|
||||
def in_s 8 21 1 Y 32768 0 8
|
||||
def in_row_s 8 21 1 Y 32768 0 8
|
||||
scalar_s exists_s in_s in_row_s
|
||||
2 0 1 0
|
||||
18 1 0 1
|
||||
2 0 1 0
|
||||
18 1 0 1
|
||||
execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
|
||||
@arg07, @arg08, @arg09 ;
|
||||
scalar_s exists_s in_s in_row_s
|
||||
2 0 1 0
|
||||
18 1 0 1
|
||||
2 0 1 0
|
||||
18 1 0 1
|
||||
set @stmt= concat('explain ',@stmt);
|
||||
prepare stmt1 from @stmt ;
|
||||
execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
|
||||
@arg07, @arg08, @arg09 ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def id 8 3 1 N 32801 0 8
|
||||
def select_type 253 19 18 N 1 31 8
|
||||
def table 253 64 10 N 1 31 8
|
||||
def type 253 10 3 N 1 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 8 3 0 Y 32800 0 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 N 32801 0 8
|
||||
def Extra 253 255 44 N 1 31 8
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t9 ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 2 Using where
|
||||
6 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary; Using filesort
|
||||
execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
|
||||
@arg07, @arg08, @arg09 ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t9 ALL NULL NULL NULL NULL 2
|
||||
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 2 Using where
|
||||
6 DERIVED t2 ALL NULL NULL NULL NULL 2
|
||||
5 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
4 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary; Using filesort
|
||||
drop table t2 ;
|
||||
select 1 < (select a from t1) ;
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
@ -3175,17 +3091,21 @@ found
|
||||
true
|
||||
set @arg00= 1.991e+3 ;
|
||||
select 'true' as found from t9
|
||||
where c1= 20 and c17= 1.991e+3 ;
|
||||
where c1= 20 and abs(c17 - 1.991e+3) < 0.01 ;
|
||||
found
|
||||
true
|
||||
select 'true' as found from t9
|
||||
where c1= 20 and c17= @arg00 ;
|
||||
where c1= 20 and abs(c17 - @arg00) < 0.01 ;
|
||||
found
|
||||
true
|
||||
prepare stmt1 from "select 'true' as found from t9
|
||||
where c1= 20 and c17= 1.991e+3" ;
|
||||
where c1= 20 and abs(c17 - 1.991e+3) < 0.01" ;
|
||||
execute stmt1 ;
|
||||
found
|
||||
true
|
||||
prepare stmt1 from "select 'true' as found from t9
|
||||
where c1= 20 and c17= ?" ;
|
||||
where c1= 20 and abs(c17 - ?) < 0.01" ;
|
||||
execute stmt1 using @arg00 ;
|
||||
found
|
||||
true
|
||||
drop table t1, t9;
|
||||
|
Reference in New Issue
Block a user