Skip to content

Commit af2e91d

Browse files
sanja-byelkinvuvova
authored andcommitted
fix for the test (real fixes will be in 10.4)
1 parent 98a39b0 commit af2e91d

9 files changed

+10
-8
lines changed

mysql-test/main/subselect.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7535,7 +7535,7 @@ FROM x
75357535
WHERE (SELECT (SELECT x WHERE x IN (SELECT x FROM x))) >
75367536
(SELECT (SELECT x ORDER BY x = x OR (x = 1 AND x = 1) DESC))
75377537
ORDER BY x ASC, x DESC, x;
7538-
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
7538+
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'x'
75397539
DROP TABLE t1, x;
75407540
#
75417541
# End of 10.4 tests

mysql-test/main/subselect.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6386,7 +6386,7 @@ let $q= WITH RECURSIVE x (x) AS (
63866386
(SELECT (SELECT x ORDER BY x = x OR (x = 1 AND x = 1) DESC))
63876387
ORDER BY x ASC, x DESC, x;
63886388

6389-
--error ER_TRUNCATED_WRONG_VALUE
6389+
--error ER_NOT_STANDARD_COMPLIANT_RECURSIVE
63906390
eval $q;
63916391

63926392
DROP TABLE t1, x;

mysql-test/main/subselect_no_exists_to_in.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7535,7 +7535,7 @@ FROM x
75357535
WHERE (SELECT (SELECT x WHERE x IN (SELECT x FROM x))) >
75367536
(SELECT (SELECT x ORDER BY x = x OR (x = 1 AND x = 1) DESC))
75377537
ORDER BY x ASC, x DESC, x;
7538-
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
7538+
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'x'
75397539
DROP TABLE t1, x;
75407540
#
75417541
# End of 10.4 tests

mysql-test/main/subselect_no_mat.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7528,7 +7528,7 @@ FROM x
75287528
WHERE (SELECT (SELECT x WHERE x IN (SELECT x FROM x))) >
75297529
(SELECT (SELECT x ORDER BY x = x OR (x = 1 AND x = 1) DESC))
75307530
ORDER BY x ASC, x DESC, x;
7531-
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
7531+
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'x'
75327532
DROP TABLE t1, x;
75337533
#
75347534
# End of 10.4 tests

mysql-test/main/subselect_no_opts.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7526,7 +7526,7 @@ FROM x
75267526
WHERE (SELECT (SELECT x WHERE x IN (SELECT x FROM x))) >
75277527
(SELECT (SELECT x ORDER BY x = x OR (x = 1 AND x = 1) DESC))
75287528
ORDER BY x ASC, x DESC, x;
7529-
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
7529+
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'x'
75307530
DROP TABLE t1, x;
75317531
#
75327532
# End of 10.4 tests

mysql-test/main/subselect_no_scache.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7541,7 +7541,7 @@ FROM x
75417541
WHERE (SELECT (SELECT x WHERE x IN (SELECT x FROM x))) >
75427542
(SELECT (SELECT x ORDER BY x = x OR (x = 1 AND x = 1) DESC))
75437543
ORDER BY x ASC, x DESC, x;
7544-
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
7544+
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'x'
75457545
DROP TABLE t1, x;
75467546
#
75477547
# End of 10.4 tests

mysql-test/main/subselect_no_semijoin.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7526,7 +7526,7 @@ FROM x
75267526
WHERE (SELECT (SELECT x WHERE x IN (SELECT x FROM x))) >
75277527
(SELECT (SELECT x ORDER BY x = x OR (x = 1 AND x = 1) DESC))
75287528
ORDER BY x ASC, x DESC, x;
7529-
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
7529+
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'x'
75307530
DROP TABLE t1, x;
75317531
#
75327532
# End of 10.4 tests

sql/item_func.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ void Item_func_neg::fix_length_and_dec_int()
18241824
Use val() to get value as arg_type doesn't mean that item is
18251825
Item_int or Item_float due to existence of Item_param.
18261826
*/
1827-
if (args[0]->const_item())
1827+
if (args[0]->const_item() && !args[0]->is_expensive())
18281828
{
18291829
longlong val= args[0]->val_int();
18301830
if ((ulonglong) val >= (ulonglong) LONGLONG_MIN &&

sql/sql_cte.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,8 @@ void With_element::check_dependencies_in_unit(st_select_lex_unit *unit,
643643
{
644644
check_dependencies_in_select(sl, &unit_ctxt_elem, in_subq, dep_map);
645645
}
646+
if ((sl= unit->fake_select_lex))
647+
check_dependencies_in_select(sl, &unit_ctxt_elem, in_subq, dep_map);
646648
}
647649

648650

0 commit comments

Comments
 (0)