Skip to content

Commit 55b96d2

Browse files
committed
bump the VERSION to 10.1.6 and related changes
fix two #if MYSQL_VERSION_ID > 100105
1 parent d1a1156 commit 55b96d2

File tree

11 files changed

+40
-92
lines changed

11 files changed

+40
-92
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MYSQL_VERSION_MAJOR=10
22
MYSQL_VERSION_MINOR=1
3-
MYSQL_VERSION_PATCH=5
3+
MYSQL_VERSION_PATCH=6
44
MYSQL_VERSION_EXTRA=

mysql-test/r/myisam-system.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ drop table if exists t1,t2;
22
create table t1 (a int) engine=myisam;
33
drop table if exists t1;
44
Warnings:
5-
Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
5+
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
66
create table t1 (a int) engine=myisam;
77
select * from t1;
88
ERROR HY000: Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
99
drop table t1;
1010
Warnings:
11-
Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
11+
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
1212
create table t1 (a int) engine=myisam;
1313
select * from t1;
1414
ERROR HY000: File './test/t1.MYD' not found (Errcode: 2 "No such file or directory")
1515
drop table t1;
1616
Warnings:
17-
Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
17+
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
1818
drop table t1;
1919
ERROR 42S02: Unknown table 'test.t1'

mysql-test/suite/federated/federated_bug_35333.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Warnings:
2929
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
3030
DROP TABLE t1;
3131
Warnings:
32-
Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
32+
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
3333
#
3434
# Cleanup
3535
#

mysql-test/suite/innodb/r/innodb.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2484,7 +2484,7 @@ INSERT INTO t2 VALUES(1);
24842484
DELETE FROM t1 WHERE id = 1;
24852485
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
24862486
DROP TABLE t1;
2487-
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
2487+
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
24882488
SET FOREIGN_KEY_CHECKS=0;
24892489
DROP TABLE t1;
24902490
SET FOREIGN_KEY_CHECKS=1;

mysql-test/suite/innodb/r/innodb_mysql.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ ERROR 42S02: Table 'test.bug29807' doesn't exist in engine
634634
drop table t1;
635635
drop table bug29807;
636636
Warnings:
637-
Warning 155 Table 'test.bug29807' doesn't exist in engine
637+
Warning 1932 Table 'test.bug29807' doesn't exist in engine
638638
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
639639
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
640640
switch to connection c1

mysql-test/suite/innodb/t/innodb.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ INSERT INTO t2 VALUES(1);
15511551
--error 1451
15521552
DELETE FROM t1 WHERE id = 1;
15531553

1554-
--error 1217
1554+
--error 1451
15551555
DROP TABLE t1;
15561556

15571557
SET FOREIGN_KEY_CHECKS=0;

mysql-test/suite/perfschema/r/dml_setup_objects.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
1717
insert into performance_schema.setup_objects
1818
set object_type='ILLEGAL', object_schema='FOO', object_name='BAR',
1919
enabled='YES', timed='YES';
20-
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
20+
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
2121
insert into performance_schema.setup_objects
2222
set object_type='TABLE', object_schema='FOO', object_name='BAR',
2323
enabled='YES', timed='YES';

mysql-test/suite/perfschema/r/setup_objects.result

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,25 @@ insert into performance_schema.setup_objects
2727
values ('TABLE', 'db4', '%', 'YES', 'NO');
2828
insert into performance_schema.setup_objects
2929
values ('SOMETHING', 'bad1', 'bad1', 'YES', 'NO');
30-
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
30+
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
3131
show warnings;
3232
Level Code Message
3333
Warning 1265 Data truncated for column 'OBJECT_TYPE' at row 1
34-
Error 1452 Cannot add or update a child row: a foreign key constraint fails ()
34+
Error 1452 Cannot add or update a child row: a foreign key constraint fails
3535
insert into performance_schema.setup_objects
3636
values ('TABLE', 'bad2', 'bad2', 'MAYBE', 'NO');
37-
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
37+
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
3838
show warnings;
3939
Level Code Message
4040
Warning 1265 Data truncated for column 'ENABLED' at row 1
41-
Error 1452 Cannot add or update a child row: a foreign key constraint fails ()
41+
Error 1452 Cannot add or update a child row: a foreign key constraint fails
4242
insert into performance_schema.setup_objects
4343
values ('TABLE', 'bad3', 'bad3', 'YES', 'MAYBE NOT');
44-
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
44+
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
4545
show warnings;
4646
Level Code Message
4747
Warning 1265 Data truncated for column 'TIMED' at row 1
48-
Error 1452 Cannot add or update a child row: a foreign key constraint fails ()
48+
Error 1452 Cannot add or update a child row: a foreign key constraint fails
4949
select * from performance_schema.setup_objects
5050
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
5151
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
@@ -64,10 +64,10 @@ set OBJECT_TYPE='SOMETHING' where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
6464
ERROR HY000: Invalid performance_schema usage.
6565
update performance_schema.setup_objects
6666
set ENABLED='MAYBE' where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
67-
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
67+
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
6868
update performance_schema.setup_objects
6969
set TIMED='MAYBE NOT' where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
70-
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
70+
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
7171
select * from performance_schema.setup_objects
7272
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
7373
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED

mysql-test/suite/rpl/r/rpl_EE_err.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ create table t1 (a int) engine=myisam;
44
flush tables;
55
drop table if exists t1;
66
Warnings:
7-
Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
7+
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
88
include/rpl_end.inc

sql/handler.cc

Lines changed: 7 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,41 +2296,6 @@ const char *get_canonical_filename(handler *file, const char *path,
22962296
}
22972297

22982298

2299-
/**
2300-
An interceptor to hijack the text of the error message without
2301-
setting an error in the thread. We need the text to present it
2302-
in the form of a warning to the user.
2303-
*/
2304-
2305-
struct Ha_delete_table_error_handler: public Internal_error_handler
2306-
{
2307-
public:
2308-
virtual bool handle_condition(THD *thd,
2309-
uint sql_errno,
2310-
const char* sqlstate,
2311-
Sql_condition::enum_warning_level level,
2312-
const char* msg,
2313-
Sql_condition ** cond_hdl);
2314-
char buff[MYSQL_ERRMSG_SIZE];
2315-
};
2316-
2317-
2318-
bool
2319-
Ha_delete_table_error_handler::
2320-
handle_condition(THD *,
2321-
uint,
2322-
const char*,
2323-
Sql_condition::enum_warning_level,
2324-
const char* msg,
2325-
Sql_condition ** cond_hdl)
2326-
{
2327-
*cond_hdl= NULL;
2328-
/* Grab the error message */
2329-
strmake_buf(buff, msg);
2330-
return TRUE;
2331-
}
2332-
2333-
23342299
/** delete a table in the engine
23352300
23362301
@note
@@ -2367,14 +2332,6 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
23672332

23682333
if (!intercept || generate_warning)
23692334
{
2370-
/*
2371-
Because file->print_error() use my_error() to generate the error message
2372-
we use an internal error handler to intercept it and store the text
2373-
in a temporary buffer. Later the message will be presented to user
2374-
as a warning.
2375-
*/
2376-
Ha_delete_table_error_handler ha_delete_table_error_handler;
2377-
23782335
/* Fill up strucutures that print_error may need */
23792336
dummy_share.path.str= (char*) path;
23802337
dummy_share.path.length= strlen(path);
@@ -2385,28 +2342,8 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
23852342
dummy_share.table_name.length= strlen(alias);
23862343
dummy_table.alias.set(alias, dummy_share.table_name.length,
23872344
table_alias_charset);
2388-
23892345
file->change_table_ptr(&dummy_table, &dummy_share);
2390-
2391-
#if MYSQL_VERSION_ID > 100105
2392-
// XXX as an ugly 10.0-only hack we intercept HA_ERR_ROW_IS_REFERENCED,
2393-
// to report it under the old historical error number.
2394-
#error remove HA_ERR_ROW_IS_REFERENCED, use ME_JUST_WARNING instead of a handler
2395-
#endif
2396-
if (intercept || error == HA_ERR_ROW_IS_REFERENCED)
2397-
thd->push_internal_handler(&ha_delete_table_error_handler);
2398-
2399-
file->print_error(error, 0);
2400-
2401-
if (intercept || error == HA_ERR_ROW_IS_REFERENCED)
2402-
{
2403-
thd->pop_internal_handler();
2404-
if (error == HA_ERR_ROW_IS_REFERENCED)
2405-
my_message(ER_ROW_IS_REFERENCED, ER(ER_ROW_IS_REFERENCED), MYF(0));
2406-
else
2407-
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, error,
2408-
ha_delete_table_error_handler.buff);
2409-
}
2346+
file->print_error(error, MYF(intercept ? ME_JUST_WARNING : 0));
24102347
}
24112348
if (intercept)
24122349
error= 0;
@@ -3528,14 +3465,18 @@ void handler::print_error(int error, myf errflag)
35283465
{
35293466
String str;
35303467
get_error_message(error, &str);
3531-
my_error(ER_ROW_IS_REFERENCED_2, errflag, str.c_ptr_safe());
3468+
my_printf_error(ER_ROW_IS_REFERENCED_2,
3469+
ER(str.length() ? ER_ROW_IS_REFERENCED_2 : ER_ROW_IS_REFERENCED),
3470+
errflag, str.c_ptr_safe());
35323471
DBUG_VOID_RETURN;
35333472
}
35343473
case HA_ERR_NO_REFERENCED_ROW:
35353474
{
35363475
String str;
35373476
get_error_message(error, &str);
3538-
my_error(ER_NO_REFERENCED_ROW_2, errflag, str.c_ptr_safe());
3477+
my_printf_error(ER_NO_REFERENCED_ROW_2,
3478+
ER(str.length() ? ER_NO_REFERENCED_ROW_2 : ER_NO_REFERENCED_ROW),
3479+
errflag, str.c_ptr_safe());
35393480
DBUG_VOID_RETURN;
35403481
}
35413482
case HA_ERR_TABLE_DEF_CHANGED:

0 commit comments

Comments
 (0)