[Commits] 4021cb5: MDEV-8854: New warning messages are unreadable

Jan Lindström jan.lindstrom at mariadb.com
Mon Nov 9 09:24:32 EET 2015


revision-id: 4021cb515ce9ea0c0f27baffc978a312c253df25 (mariadb-5.5.46-3-g4021cb5)
parent(s): df804208657dfae10e24d656d9228f05e57b14a5
committer: Jan Lindström
timestamp: 2015-11-09 09:23:32 +0200
message:

MDEV-8854: New warning messages are unreadable

Improved warning messages by quote marks.

---
 .../suite/innodb/r/innodb-fk-warnings.result       |  24 ++--
 mysql-test/suite/innodb/r/innodb-fk.result         |   6 +-
 storage/innobase/dict/dict0dict.c                  | 122 ++++++++++-----------
 storage/xtradb/dict/dict0dict.c                    | 122 ++++++++++-----------
 4 files changed, 136 insertions(+), 138 deletions(-)

diff --git a/mysql-test/suite/innodb/r/innodb-fk-warnings.result b/mysql-test/suite/innodb/r/innodb-fk-warnings.result
index 542fc97..b3360d0 100644
--- a/mysql-test/suite/innodb/r/innodb-fk-warnings.result
+++ b/mysql-test/suite/innodb/r/innodb-fk-warnings.result
@@ -24,7 +24,7 @@ create table t2(a int, constraint a foreign key a (a) references t1(a)) engine=i
 ERROR HY000: Can't create table 'test.t2' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Create  table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. Error close to  foreign key a (a) references t1(a)) engine=innodb.
+Warning	150	Create  table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key a (a) references t1(a)) engine=innodb'.
 Error	1005	Can't create table 'test.t2' (errno: 150)
 drop table t1;
 create table t1(a int not null primary key, b int) engine=innodb;
@@ -33,14 +33,14 @@ constraint a foreign key a (a) references t1(b)) engine=innodb;
 ERROR HY000: Can't create table 'test.t2' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Create  table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. Error close to  foreign key a (a) references t1(b)) engine=innodb.
+Warning	150	Create  table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key a (a) references t1(b)) engine=innodb'.
 Error	1005	Can't create table 'test.t2' (errno: 150)
 create table t2(a int, b int, constraint a foreign key a (a) references t1(a)) engine=innodb;
 alter table t2 add constraint b foreign key (b) references t2(b);
 ERROR HY000: Can't create table '#sql-temporary' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Alter  table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. Error close to  foreign key (b) references t2(b).
+Warning	150	Alter  table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key (b) references t2(b)'.
 Error	1005	Can't create table '#sql-temporary' (errno: 150)
 drop table t2, t1;
 create table t1 (f1 integer primary key) engine=innodb;
@@ -48,7 +48,7 @@ alter table t1 add constraint c1 foreign key (f1) references t11(f1);
 ERROR HY000: Can't create table '#sql-temporary' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t11` not found in the data dictionary close to  foreign key (f1) references t11(f1).
+Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t11` not found in the data dictionary near ' foreign key (f1) references t11(f1)'.
 Error	1005	Can't create table '#sql-temporary' (errno: 150)
 drop table t1;
 create temporary table t1(a int not null primary key, b int, key(b)) engine=innodb;
@@ -56,13 +56,13 @@ create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
 ERROR HY000: Can't create table 'test.t2' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Create  table `mysqld.1`.`t2` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(a) references t1(a)) engine=innodb.
+Warning	150	Create  table `mysqld.1`.`t2` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary near 'foreign key(a) references t1(a)) engine=innodb'.
 Error	1005	Can't create table 'test.t2' (errno: 150)
 alter table t1 add foreign key(b) references t1(a);
 ERROR HY000: Can't create table '#sql-temporary' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Alter  table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(b) references t1(a).
+Warning	150	Alter  table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary near 'foreign key(b) references t1(a)'.
 Error	1005	Can't create table '#sql-temporary' (errno: 150)
 drop table t1;
 create table t1(a int not null primary key, b int, key(b)) engine=innodb;
@@ -70,7 +70,8 @@ alter table t1 add foreign key(a,b) references t1(a);
 ERROR HY000: Can't create table '#sql-temporary' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. Foreign key constraint parse error in foreign key(a,b) references t1(a) close to ). Too few referenced columns, you have 1 when you should have 2.
+Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. Parse error in 'foreign key(a,b) references t1(a)' near ')'.  Referencing column count 1 does not match referenced column count 2.
+
 Error	1005	Can't create table '#sql-temporary' (errno: 150)
 drop table t1;
 create table t1(a int not null primary key, b int, key(b)) engine=innodb;
@@ -78,7 +79,8 @@ alter table t1 add foreign key(a) references t1(a,b);
 ERROR HY000: Can't create table '#sql-temporary' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. Foreign key constraint parse error in foreign key(a) references t1(a,b) close to ). Too few referenced columns, you have 2 when you should have 1.
+Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. Parse error in 'foreign key(a) references t1(a,b)' near ')'.  Referencing column count 2 does not match referenced column count 1.
+
 Error	1005	Can't create table '#sql-temporary' (errno: 150)
 drop table t1;
 create table t1 (f1 integer not null primary key) engine=innodb;
@@ -86,13 +88,13 @@ alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update se
 ERROR HY000: Can't create table '#sql-temporary' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. You have defined a SET NULL condition but column f1 is defined as NOT NULL in  foreign key (f1) references t1(f1) on update set null close to  on update set null.
+Warning	150	Alter  table `test`.`t1` with foreign key constraint failed. You have defined a SET NULL condition but column 'f1' is defined as NOT NULL in ' foreign key (f1) references t1(f1) on update set null' near ' on update set null'.
 Error	1005	Can't create table '#sql-temporary' (errno: 150)
 create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
 ERROR HY000: Can't create table 'test.t2' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Create  table `test`.`t2` with foreign key constraint failed. You have defined a SET NULL condition but column a is defined as NOT NULL in foreign key(a) references t1(f1) on delete set null) engine=innodb close to  on delete set null) engine=innodb.
+Warning	150	Create  table `test`.`t2` with foreign key constraint failed. You have defined a SET NULL condition but column 'a' is defined as NOT NULL in 'foreign key(a) references t1(f1) on delete set null) engine=innodb' near ' on delete set null) engine=innodb'.
 Error	1005	Can't create table 'test.t2' (errno: 150)
 drop table t1;
 create table t1 (id int not null primary key, f1 int, f2 int, key(f1)) engine=innodb;
@@ -100,6 +102,6 @@ create table t2(a char(20), key(a), foreign key(a) references t1(f1)) engine=inn
 ERROR HY000: Can't create table 'test.t2' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Create  table `test`.`t2` with foreign key constraint failed. Field type or character set for column a does not mach referenced column f1 close to foreign key(a) references t1(f1)) engine=innodb
+Warning	150	Create  table `test`.`t2` with foreign key constraint failed. Field type or character set for column 'a' does not mach referenced column 'f1' near 'foreign key(a) references t1(f1)) engine=innodb'.
 Error	1005	Can't create table 'test.t2' (errno: 150)
 drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb-fk.result b/mysql-test/suite/innodb/r/innodb-fk.result
index 2b53bc2..6c3306f 100644
--- a/mysql-test/suite/innodb/r/innodb-fk.result
+++ b/mysql-test/suite/innodb/r/innodb-fk.result
@@ -50,8 +50,8 @@ CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
 ERROR HY000: Can't create table 'test.t2' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Create  table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary close to  FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
-) ENGINE=InnoDB.
+Warning	150	Create  table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary near ' FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
+) ENGINE=InnoDB'.
 Error	1005	Can't create table 'test.t2' (errno: 150)
 CREATE TABLE t2 (
 id int(11) NOT NULL AUTO_INCREMENT,
@@ -64,7 +64,7 @@ ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE
 ERROR HY000: Can't create table '#sql-temporary' (errno: 150)
 show warnings;
 Level	Code	Message
-Warning	150	Alter  table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary close to  FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE.
+Warning	150	Alter  table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary near ' FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE'.
 Error	1005	Can't create table '#sql-temporary' (errno: 150)
 drop table t2;
 drop table t1;
diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c
index ad90038..17e9eb1 100644
--- a/storage/innobase/dict/dict0dict.c
+++ b/storage/innobase/dict/dict0dict.c
@@ -3628,13 +3628,13 @@ dict_foreign_push_index_error(
 			"%s table '%s' with foreign key constraint"
 			" failed. There is no index in the referenced"
 			" table where the referenced columns appear"
-			" as the first columns. Error close to %s.\n",
+			" as the first columns near '%s'.\n",
 			operation, create_name, latest_foreign);
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table '%s' with foreign key constraint"
 			" failed. There is no index in the referenced"
 			" table where the referenced columns appear"
-			" as the first columns. Error close to %s.",
+			" as the first columns near '%s'.",
 			operation, create_name, latest_foreign);
 		break;
 	}
@@ -3643,13 +3643,13 @@ dict_foreign_push_index_error(
 			"%s table '%s' with foreign key constraint"
 			" failed. There is only prefix index in the referenced"
 			" table where the referenced columns appear"
-			" as the first columns. Error close to %s.\n",
+			" as the first columns near '%s'.\n",
 			operation, create_name, latest_foreign);
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table '%s' with foreign key constraint"
 			" failed. There is only prefix index in the referenced"
 			" table where the referenced columns appear"
-			" as the first columns. Error close to %s.",
+			" as the first columns near '%s'.",
 			operation, create_name, latest_foreign);
 		break;
 	}
@@ -3657,12 +3657,12 @@ dict_foreign_push_index_error(
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
 			" failed. You have defined a SET NULL condition but "
-			"field %s on index is defined as NOT NULL close to %s\n",
+			"column '%s' on index is defined as NOT NULL near '%s'.\n",
 			operation, create_name, columns[err_col], latest_foreign);
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
 			" failed. You have defined a SET NULL condition but "
-			"field %s on index is defined as NOT NULL close to %s",
+			"column '%s' on index is defined as NOT NULL near '%s'.",
 			operation, create_name, columns[err_col], latest_foreign);
 		break;
 	}
@@ -3675,13 +3675,13 @@ dict_foreign_push_index_error(
 			table, dict_col_get_no(field->col));
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
-			" failed. Field type or character set for column %s "
-			"does not mach referenced column %s close to %s\n",
+			" failed. Field type or character set for column '%s' "
+			"does not mach referenced column '%s' near '%s'.\n",
 			operation, create_name, columns[err_col], col_name, latest_foreign);
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Field type or character set for column %s "
-			"does not mach referenced column %s close to %s",
+			" failed. Field type or character set for column '%s' "
+			"does not mach referenced column '%s' near '%s'.",
 			operation, create_name, columns[err_col], col_name, latest_foreign);
 		break;
 	}
@@ -3973,14 +3973,14 @@ dict_create_foreign_constraints_low(
 		if (!success) {
 			dict_foreign_report_syntax_err(
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.\n",
+				" failed. Parse error in '%s'"
+				" near '%s'.\n",
 				operation, create_name, start_of_latest_foreign, orig);
 
 			ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.",
+				" failed. Parse error in '%s'"
+				" near '%s'.",
 				operation, create_name, start_of_latest_foreign, orig);
 
 			return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4009,16 +4009,16 @@ dict_create_foreign_constraints_low(
 		dict_foreign_error_report_low(ef, create_name);
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		mutex_exit(&dict_foreign_err_mutex);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4038,14 +4038,14 @@ dict_create_foreign_constraints_low(
 	if (!success) {
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4081,14 +4081,14 @@ dict_create_foreign_constraints_low(
 	if (!success || !my_isspace(cs, *ptr)) {
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 		return(DB_CANNOT_ADD_CONSTRAINT);
 	}
@@ -4148,7 +4148,7 @@ dict_create_foreign_constraints_low(
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint failed. Referenced table %s not found in the data dictionary "
-			"close to %s.",
+			"near '%s'.",
 			operation, create_name, buf, start_of_latest_foreign);
 
 		dict_foreign_free(foreign);
@@ -4157,7 +4157,7 @@ dict_create_foreign_constraints_low(
 		dict_foreign_error_report_low(ef, create_name);
 		fprintf(ef,
 			"%s table %s with foreign key constraint failed. Referenced table %s not found in the data dictionary "
-			"close to %s.\n",
+			"near '%s'.\n",
 			operation, create_name, buf, start_of_latest_foreign);
 
 		mutex_exit(&dict_foreign_err_mutex);
@@ -4172,14 +4172,14 @@ dict_create_foreign_constraints_low(
 		dict_foreign_free(foreign);
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4201,16 +4201,16 @@ dict_create_foreign_constraints_low(
 		dict_foreign_error_report_low(ef, create_name);
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		mutex_exit(&dict_foreign_err_mutex);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 		return(DB_CANNOT_ADD_CONSTRAINT);
 	}
@@ -4228,14 +4228,12 @@ dict_create_foreign_constraints_low(
 
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s. Too few referenced columns.\n",
+			" failed. Parse error in '%s' near '%s'.  Referencing column count does not match referenced column count.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s. Too few referenced columns, you have %d when you should have %d.",
+			" failed. Parse error in '%s' near '%s'.  Referencing column count %d does not match referenced column count %d.\n",
 			operation, create_name, start_of_latest_foreign, orig, i, foreign->n_fields);
 
 		dict_foreign_free(foreign);
@@ -4268,14 +4266,14 @@ dict_create_foreign_constraints_low(
 
 			dict_foreign_report_syntax_err(
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.\n",
+				" failed. Parse error in '%s'"
+				" near '%s'.\n",
 				operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 			ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.",
+				" failed. Parse error in '%s'"
+				" near '%s'.",
 				operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 			return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4316,14 +4314,14 @@ dict_create_foreign_constraints_low(
 			dict_foreign_free(foreign);
 			dict_foreign_report_syntax_err(
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.\n",
+				" failed. Parse error in '%s'"
+				" near '%s'.\n",
 				operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 			ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.",
+				" failed. Parse error in '%s'"
+				" near '%s'.",
 				operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 			return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4345,14 +4343,14 @@ dict_create_foreign_constraints_low(
 		dict_foreign_free(foreign);
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4365,14 +4363,14 @@ dict_create_foreign_constraints_low(
 		dict_foreign_free(foreign);
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 		return(DB_CANNOT_ADD_CONSTRAINT);
 	}
@@ -4392,16 +4390,16 @@ dict_create_foreign_constraints_low(
 			dict_foreign_error_report_low(ef, create_name);
 			fprintf(ef,
 				"%s table %s with foreign key constraint"
-				" failed. You have defined a SET NULL condition but column %s is defined as NOT NULL"
-				" in %s close to %s.\n",
+				" failed. You have defined a SET NULL condition but column '%s' is defined as NOT NULL"
+				" in '%s' near '%s'.\n",
 				operation, create_name, col_name, start_of_latest_foreign, start_of_latest_set);
 			mutex_exit(&dict_foreign_err_mutex);
 
 
 			ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 				"%s table %s with foreign key constraint"
-				" failed. You have defined a SET NULL condition but column %s is defined as NOT NULL"
-				" in %s close to %s.",
+				" failed. You have defined a SET NULL condition but column '%s' is defined as NOT NULL"
+				" in '%s' near '%s'.",
 				operation, create_name, col_name, start_of_latest_foreign, start_of_latest_set);
 
 			dict_foreign_free(foreign);
@@ -4427,14 +4425,14 @@ dict_create_foreign_constraints_low(
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
 			" failed. You have more than one on delete or on update clause"
-			" in %s close to %s.\n",
+			" in '%s' near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 		mutex_exit(&dict_foreign_err_mutex);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
 			" failed. You have more than one on delete or on update clause"
-			" in %s close to %s.",
+			" in '%s' near '%s'.",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 		dict_foreign_free(foreign);
 		return(DB_CANNOT_ADD_CONSTRAINT);
diff --git a/storage/xtradb/dict/dict0dict.c b/storage/xtradb/dict/dict0dict.c
index cd8e415..7351de5 100644
--- a/storage/xtradb/dict/dict0dict.c
+++ b/storage/xtradb/dict/dict0dict.c
@@ -3762,13 +3762,13 @@ dict_foreign_push_index_error(
 			"%s table '%s' with foreign key constraint"
 			" failed. There is no index in the referenced"
 			" table where the referenced columns appear"
-			" as the first columns. Error close to %s.\n",
+			" as the first columns near '%s'.\n",
 			operation, create_name, latest_foreign);
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table '%s' with foreign key constraint"
 			" failed. There is no index in the referenced"
 			" table where the referenced columns appear"
-			" as the first columns. Error close to %s.",
+			" as the first columns near '%s'.",
 			operation, create_name, latest_foreign);
 		break;
 	}
@@ -3777,13 +3777,13 @@ dict_foreign_push_index_error(
 			"%s table '%s' with foreign key constraint"
 			" failed. There is only prefix index in the referenced"
 			" table where the referenced columns appear"
-			" as the first columns. Error close to %s.\n",
+			" as the first columns near '%s'.\n",
 			operation, create_name, latest_foreign);
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table '%s' with foreign key constraint"
 			" failed. There is only prefix index in the referenced"
 			" table where the referenced columns appear"
-			" as the first columns. Error close to %s.",
+			" as the first columns near '%s'.",
 			operation, create_name, latest_foreign);
 		break;
 	}
@@ -3791,12 +3791,12 @@ dict_foreign_push_index_error(
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
 			" failed. You have defined a SET NULL condition but "
-			"field %s on index is defined as NOT NULL close to %s\n",
+			"column '%s' on index is defined as NOT NULL near '%s'.\n",
 			operation, create_name, columns[err_col], latest_foreign);
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
 			" failed. You have defined a SET NULL condition but "
-			"field %s on index is defined as NOT NULL close to %s",
+			"column '%s' on index is defined as NOT NULL near '%s'.",
 			operation, create_name, columns[err_col], latest_foreign);
 		break;
 	}
@@ -3809,13 +3809,13 @@ dict_foreign_push_index_error(
 			table, dict_col_get_no(field->col));
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
-			" failed. Field type or character set for column %s "
-			"does not mach referenced column %s close to %s\n",
+			" failed. Field type or character set for column '%s' "
+			"does not mach referenced column '%s' near '%s'.\n",
 			operation, create_name, columns[err_col], col_name, latest_foreign);
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Field type or character set for column %s "
-			"does not mach referenced column %s close to %s",
+			" failed. Field type or character set for column '%s' "
+			"does not mach referenced column '%s' near '%s'.",
 			operation, create_name, columns[err_col], col_name, latest_foreign);
 		break;
 	}
@@ -4107,14 +4107,14 @@ dict_create_foreign_constraints_low(
 		if (!success) {
 			dict_foreign_report_syntax_err(
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.\n",
+				" failed. Parse error in '%s'"
+				" near '%s'.\n",
 				operation, create_name, start_of_latest_foreign, orig);
 
 			ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.",
+				" failed. Parse error in '%s'"
+				" near '%s'.",
 				operation, create_name, start_of_latest_foreign, orig);
 
 			return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4143,16 +4143,16 @@ dict_create_foreign_constraints_low(
 		dict_foreign_error_report_low(ef, create_name);
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		mutex_exit(&dict_foreign_err_mutex);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4172,14 +4172,14 @@ dict_create_foreign_constraints_low(
 	if (!success) {
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4215,14 +4215,14 @@ dict_create_foreign_constraints_low(
 	if (!success || !my_isspace(cs, *ptr)) {
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 		return(DB_CANNOT_ADD_CONSTRAINT);
 	}
@@ -4282,7 +4282,7 @@ dict_create_foreign_constraints_low(
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint failed. Referenced table %s not found in the data dictionary "
-			"close to %s.",
+			"near '%s'.",
 			operation, create_name, buf, start_of_latest_foreign);
 
 		dict_foreign_free(foreign);
@@ -4291,7 +4291,7 @@ dict_create_foreign_constraints_low(
 		dict_foreign_error_report_low(ef, create_name);
 		fprintf(ef,
 			"%s table %s with foreign key constraint failed. Referenced table %s not found in the data dictionary "
-			"close to %s.\n",
+			"near '%s'.\n",
 			operation, create_name, buf, start_of_latest_foreign);
 
 		mutex_exit(&dict_foreign_err_mutex);
@@ -4306,14 +4306,14 @@ dict_create_foreign_constraints_low(
 		dict_foreign_free(foreign);
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4335,16 +4335,16 @@ dict_create_foreign_constraints_low(
 		dict_foreign_error_report_low(ef, create_name);
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		mutex_exit(&dict_foreign_err_mutex);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, orig);
 		return(DB_CANNOT_ADD_CONSTRAINT);
 	}
@@ -4362,14 +4362,12 @@ dict_create_foreign_constraints_low(
 
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s. Too few referenced columns\n",
+			" failed. Parse error in '%s' near '%s'.  Referencing column count does not match referenced column count.\n",
 			operation, create_name, start_of_latest_foreign, orig);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s. Too few referenced columns, you have %d when you should have %d.",
+			" failed. Parse error in '%s' near '%s'.  Referencing column count %d does not match referenced column count %d.\n",
 			operation, create_name, start_of_latest_foreign, orig, i, foreign->n_fields);
 
 		dict_foreign_free(foreign);
@@ -4402,14 +4400,14 @@ dict_create_foreign_constraints_low(
 
 			dict_foreign_report_syntax_err(
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.\n",
+				" failed. Parse error in '%s'"
+				" near '%s'.\n",
 				operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 			ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.",
+				" failed. Parse error in '%s'"
+				" near '%s'.",
 				operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 			return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4450,14 +4448,14 @@ dict_create_foreign_constraints_low(
 			dict_foreign_free(foreign);
 			dict_foreign_report_syntax_err(
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.\n",
+				" failed. Parse error in '%s'"
+				" near '%s'.\n",
 				operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 			ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 				"%s table %s with foreign key constraint"
-				" failed. Foreign key constraint parse error in %s"
-				" close to %s.",
+				" failed. Parse error in '%s'"
+				" near '%s'.",
 				operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 			return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4479,14 +4477,14 @@ dict_create_foreign_constraints_low(
 		dict_foreign_free(foreign);
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -4499,14 +4497,14 @@ dict_create_foreign_constraints_low(
 		dict_foreign_free(foreign);
 		dict_foreign_report_syntax_err(
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.\n",
+			" failed. Parse error in '%s'"
+			" near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
-			" failed. Foreign key constraint parse error in %s"
-			" close to %s.",
+			" failed. Parse error in '%s'"
+			" near '%s'.",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 		return(DB_CANNOT_ADD_CONSTRAINT);
 	}
@@ -4526,16 +4524,16 @@ dict_create_foreign_constraints_low(
 			dict_foreign_error_report_low(ef, create_name);
 			fprintf(ef,
 				"%s table %s with foreign key constraint"
-				" failed. You have defined a SET NULL condition but column %s is defined as NOT NULL"
-				" in %s close to %s.\n",
+				" failed. You have defined a SET NULL condition but column '%s' is defined as NOT NULL"
+				" in '%s' near '%s'.\n",
 				operation, create_name, col_name, start_of_latest_foreign, start_of_latest_set);
 			mutex_exit(&dict_foreign_err_mutex);
 
 
 			ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 				"%s table %s with foreign key constraint"
-				" failed. You have defined a SET NULL condition but column %s is defined as NOT NULL"
-				" in %s close to %s.",
+				" failed. You have defined a SET NULL condition but column '%s' is defined as NOT NULL"
+				" in '%s' near '%s'.",
 				operation, create_name, col_name, start_of_latest_foreign, start_of_latest_set);
 
 			dict_foreign_free(foreign);
@@ -4561,14 +4559,14 @@ dict_create_foreign_constraints_low(
 		fprintf(ef,
 			"%s table %s with foreign key constraint"
 			" failed. You have more than one on delete or on update clause"
-			" in %s close to %s.\n",
+			" in '%s' near '%s'.\n",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 		mutex_exit(&dict_foreign_err_mutex);
 
 		ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT,
 			"%s table %s with foreign key constraint"
 			" failed. You have more than one on delete or on update clause"
-			" in %s close to %s.",
+			" in '%s' near '%s'.",
 			operation, create_name, start_of_latest_foreign, start_of_latest_set);
 		dict_foreign_free(foreign);
 		return(DB_CANNOT_ADD_CONSTRAINT);



More information about the commits mailing list