Skip to content

Commit 0de4c3b

Browse files
author
Andrei Elkin
committed
merge bug11754117-45670 fixes from 5.5: fixing error codes shift.
1 parent b228767 commit 0de4c3b

31 files changed

+265
-265
lines changed

mysql-test/extra/rpl_tests/rpl_loaddata.test

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ if (`SELECT @@global.binlog_format != 'ROW'`)
161161
# Query causes error on master but not on slave. This causes the slave to
162162
# stop with error code 0 (which is wrong: see BUG#57287)
163163
# ER_MTS_INCONSISTENT_DATA
164-
--let $slave_sql_errno= 0,1755
164+
--let $slave_sql_errno= 0,1756
165165
--source include/wait_for_slave_sql_error.inc
166166
drop table t1, t2;
167167
}

mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ call mtr.add_suppression("The slave coordinator and worker threads are stopped,
2929

3030
--echo (expect different error codes on master and slave)
3131
# ER_MTS_INCONSISTENT_DATA
32-
--let $slave_sql_errno= 0,1755
32+
--let $slave_sql_errno= 0,1756
3333
# can't print error text. MTS reports a separate error in this case.
3434
# Todo: to fix single-threaded-slave BUG#57287.
3535
--let $show_slave_sql_error= 0

mysql-test/r/explain.result

+6-6
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE url=1;
419419
id select_type table type possible_keys key key_len ref rows filtered Extra
420420
1 SIMPLE t1 index PRIMARY PRIMARY 1 NULL 5 100.00 Using where; Using index
421421
Warnings:
422-
Warning 1738 Cannot use ref access on index 'PRIMARY' due to type or collation conversion on field 'url'
423-
Warning 1738 Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
422+
Warning 1739 Cannot use ref access on index 'PRIMARY' due to type or collation conversion on field 'url'
423+
Warning 1739 Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
424424
Note 1003 /* select#1 */ select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.`url` = 1)
425425

426426
# Test that index can't be used for lookup due to collation mismatch
@@ -431,8 +431,8 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE url='1' collate latin1_german2_ci;
431431
id select_type table type possible_keys key key_len ref rows filtered Extra
432432
1 SIMPLE t1 index PRIMARY PRIMARY 1 NULL 5 100.00 Using where; Using index
433433
Warnings:
434-
Warning 1738 Cannot use ref access on index 'PRIMARY' due to type or collation conversion on field 'url'
435-
Warning 1738 Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
434+
Warning 1739 Cannot use ref access on index 'PRIMARY' due to type or collation conversion on field 'url'
435+
Warning 1739 Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
436436
Note 1003 /* select#1 */ select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.`url` = <cache>(('1' collate latin1_german2_ci)))
437437

438438
# Normally, range access on primary key is done
@@ -452,7 +452,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE url>3;
452452
id select_type table type possible_keys key key_len ref rows filtered Extra
453453
1 SIMPLE t1 index PRIMARY PRIMARY 1 NULL 5 100.00 Using where; Using index
454454
Warnings:
455-
Warning 1738 Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
455+
Warning 1739 Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
456456
Note 1003 /* select#1 */ select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.`url` > 3)
457457

458458
# Test that range access on index can't be done due to collation mismatch
@@ -464,7 +464,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE url>'3' collate latin1_german2_ci;
464464
id select_type table type possible_keys key key_len ref rows filtered Extra
465465
1 SIMPLE t1 index PRIMARY PRIMARY 1 NULL 5 100.00 Using where; Using index
466466
Warnings:
467-
Warning 1738 Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
467+
Warning 1739 Cannot use range access on index 'PRIMARY' due to type or collation conversion on field 'url'
468468
Note 1003 /* select#1 */ select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.`url` > <cache>(('3' collate latin1_german2_ci)))
469469

470470
DROP TABLE t1;

mysql-test/r/get_diagnostics.result

+12-12
Original file line numberDiff line numberDiff line change
@@ -232,26 +232,26 @@ GET DIAGNOSTICS CONDITION "1" @var = CLASS_ORIGIN;
232232
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
233233
GET DIAGNOSTICS CONDITION 9999 @var = CLASS_ORIGIN;
234234
Warnings:
235-
Error 1757 Invalid condition number
235+
Error 1758 Invalid condition number
236236
GET DIAGNOSTICS CONDITION NULL @var = CLASS_ORIGIN;
237237
Warnings:
238-
Error 1757 Invalid condition number
239-
Error 1757 Invalid condition number
238+
Error 1758 Invalid condition number
239+
Error 1758 Invalid condition number
240240
GET DIAGNOSTICS CONDITION a @var = CLASS_ORIGIN;
241241
Warnings:
242-
Error 1757 Invalid condition number
243-
Error 1757 Invalid condition number
242+
Error 1758 Invalid condition number
243+
Error 1758 Invalid condition number
244244
Error 1054 Unknown column 'a' in 'field list'
245245
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
246246
SET @cond = 1;
247247
GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN;
248248
Warnings:
249-
Error 1757 Invalid condition number
249+
Error 1758 Invalid condition number
250250
SET @cond = "invalid";
251251
GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN;
252252
Warnings:
253-
Error 1757 Invalid condition number
254-
Error 1757 Invalid condition number
253+
Error 1758 Invalid condition number
254+
Error 1758 Invalid condition number
255255
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
256256
CREATE PROCEDURE p1()
257257
BEGIN
@@ -301,11 +301,11 @@ Warning 1292 Truncated incorrect DECIMAL value: ''
301301
GET DIAGNOSTICS CONDITION 99999 @var = CLASS_ORIGIN;
302302
Warnings:
303303
Warning 1292 Truncated incorrect DECIMAL value: ''
304-
Error 1757 Invalid condition number
304+
Error 1758 Invalid condition number
305305
SHOW WARNINGS;
306306
Level Code Message
307307
Warning 1292 Truncated incorrect DECIMAL value: ''
308-
Error 1757 Invalid condition number
308+
Error 1758 Invalid condition number
309309

310310
# Statement information runtime
311311

@@ -488,14 +488,14 @@ CALL p1();
488488
CAST(-19999999999999999999 AS SIGNED) -9223372036854775808
489489
errno1 1292
490490
msg1 Truncated incorrect DECIMAL value: ''
491-
errno2 1757
491+
errno2 1758
492492
msg2 Invalid condition number
493493
Warnings:
494494
Level Warning
495495
Code 1292
496496
Message Truncated incorrect DECIMAL value: ''
497497
Level Error
498-
Code 1757
498+
Code 1758
499499
Message Invalid condition number
500500
DROP PROCEDURE p1;
501501

mysql-test/r/innodb_explain_json_non_select_all.result

+32-32
Original file line numberDiff line numberDiff line change
@@ -2852,8 +2852,8 @@ EXPLAIN EXTENDED DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
28522852
id select_type table type possible_keys key key_len ref rows filtered Extra
28532853
1 SIMPLE t1 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort
28542854
Warnings:
2855-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2856-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2855+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2856+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
28572857
# Status of EXPLAIN EXTENDED query
28582858
Variable_name Value
28592859
EXPLAIN FORMAT=JSON DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -2878,18 +2878,18 @@ EXPLAIN
28782878
} /* query_block */
28792879
}
28802880
Warnings:
2881-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2882-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2881+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2882+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
28832883
FLUSH STATUS;
28842884
FLUSH TABLES;
28852885
EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
28862886
id select_type table type possible_keys key key_len ref rows filtered Extra
28872887
1 SIMPLE t1 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort
28882888
Warnings:
2889-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2890-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2891-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2892-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2889+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2890+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2891+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2892+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
28932893
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
28942894
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
28952895
Variable_name Value
@@ -2914,10 +2914,10 @@ EXPLAIN
29142914
} /* query_block */
29152915
}
29162916
Warnings:
2917-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2918-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2919-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2920-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2917+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2918+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2919+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
2920+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
29212921
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where ((`test`.`t1`.`i` > 10) and (`test`.`t1`.`i` <= 18)) order by `test`.`t1`.`i` limit 5
29222922
# Status of "equivalent" SELECT query execution:
29232923
Variable_name Value
@@ -3133,7 +3133,7 @@ EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
31333133
id select_type table type possible_keys key key_len ref rows filtered Extra
31343134
1 SIMPLE t2 ALL a NULL NULL NULL 26 100.00 Using where; Using filesort
31353135
Warnings:
3136-
Warning 1738 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
3136+
Warning 1739 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
31373137
# Status of EXPLAIN EXTENDED query
31383138
Variable_name Value
31393139
EXPLAIN FORMAT=JSON DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3158,7 +3158,7 @@ EXPLAIN
31583158
} /* query_block */
31593159
}
31603160
Warnings:
3161-
Warning 1738 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
3161+
Warning 1739 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
31623162
FLUSH STATUS;
31633163
FLUSH TABLES;
31643164
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3226,7 +3226,7 @@ EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
32263226
id select_type table type possible_keys key key_len ref rows filtered Extra
32273227
1 SIMPLE t2 ALL a NULL NULL NULL 26 100.00 Using where; Using filesort
32283228
Warnings:
3229-
Warning 1738 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
3229+
Warning 1739 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
32303230
# Status of EXPLAIN EXTENDED query
32313231
Variable_name Value
32323232
EXPLAIN FORMAT=JSON DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -3251,7 +3251,7 @@ EXPLAIN
32513251
} /* query_block */
32523252
}
32533253
Warnings:
3254-
Warning 1738 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
3254+
Warning 1739 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
32553255
FLUSH STATUS;
32563256
FLUSH TABLES;
32573257
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -3758,8 +3758,8 @@ EXPLAIN EXTENDED UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT
37583758
id select_type table type possible_keys key key_len ref rows filtered Extra
37593759
1 SIMPLE t2 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort
37603760
Warnings:
3761-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3762-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3761+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3762+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
37633763
# Status of EXPLAIN EXTENDED query
37643764
Variable_name Value
37653765
EXPLAIN FORMAT=JSON UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;;
@@ -3784,18 +3784,18 @@ EXPLAIN
37843784
} /* query_block */
37853785
}
37863786
Warnings:
3787-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3788-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3787+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3788+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
37893789
FLUSH STATUS;
37903790
FLUSH TABLES;
37913791
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
37923792
id select_type table type possible_keys key key_len ref rows filtered Extra
37933793
1 SIMPLE t2 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort
37943794
Warnings:
3795-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3796-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3797-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3798-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3795+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3796+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3797+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3798+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
37993799
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
38003800
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
38013801
Variable_name Value
@@ -3820,10 +3820,10 @@ EXPLAIN
38203820
} /* query_block */
38213821
}
38223822
Warnings:
3823-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3824-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3825-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3826-
Warning 1738 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3823+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3824+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3825+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
3826+
Warning 1739 Cannot use range access on index 'i' due to type or collation conversion on field 'i'
38273827
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where ((`test`.`t2`.`i` > 10) and (`test`.`t2`.`i` <= 18)) order by `test`.`t2`.`i` limit 5
38283828
# Status of "equivalent" SELECT query execution:
38293829
Variable_name Value
@@ -4041,7 +4041,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
40414041
id select_type table type possible_keys key key_len ref rows filtered Extra
40424042
1 SIMPLE t2 ALL a NULL NULL NULL 26 100.00 Using where; Using filesort
40434043
Warnings:
4044-
Warning 1738 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
4044+
Warning 1739 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
40454045
# Status of EXPLAIN EXTENDED query
40464046
Variable_name Value
40474047
EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -4066,7 +4066,7 @@ EXPLAIN
40664066
} /* query_block */
40674067
}
40684068
Warnings:
4069-
Warning 1738 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
4069+
Warning 1739 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
40704070
FLUSH STATUS;
40714071
FLUSH TABLES;
40724072
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -4134,7 +4134,7 @@ EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
41344134
id select_type table type possible_keys key key_len ref rows filtered Extra
41354135
1 SIMPLE t2 ALL a NULL NULL NULL 26 100.00 Using where; Using filesort
41364136
Warnings:
4137-
Warning 1738 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
4137+
Warning 1739 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
41384138
# Status of EXPLAIN EXTENDED query
41394139
Variable_name Value
41404140
EXPLAIN FORMAT=JSON UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;;
@@ -4159,7 +4159,7 @@ EXPLAIN
41594159
} /* query_block */
41604160
}
41614161
Warnings:
4162-
Warning 1738 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
4162+
Warning 1739 Cannot use range access on index 'a' due to type or collation conversion on field 'b'
41634163
FLUSH STATUS;
41644164
FLUSH TABLES;
41654165
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;

0 commit comments

Comments
 (0)