Skip to content

Commit

Permalink
say MariaDB in InnoDB error messages, not MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Dec 12, 2016
1 parent f7dcd8a commit 0852cf5
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 39 deletions.
12 changes: 6 additions & 6 deletions mysql-test/suite/innodb/r/innodb-corrupted-table.result
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
call mtr.add_suppression("Table .* has a primary key in InnoDB data dictionary, but not in MySQL.*");
call mtr.add_suppression("InnoDB: Table .* contains .* indexes inside InnoDB, which is different from the number of indexes .* defined in the MySQL.*");
call mtr.add_suppression("Table .* has a primary key in InnoDB data dictionary, but not in MariaDB.*");
call mtr.add_suppression("InnoDB: Table .* contains .* indexes inside InnoDB, which is different from the number of indexes .* defined in the MariaDB.*");
create table t1 (pk int, i int, key(i)) engine=InnoDB;
insert into t1 values (1,1),(2,2);
flush tables;
Expand All @@ -14,18 +14,18 @@ t1 CREATE TABLE `t1` (
KEY `i` (`i`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
Warnings:
Warning 1082 InnoDB: Table test/t1 has a primary key in InnoDB data dictionary, but not in MySQL!
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL
Warning 1082 InnoDB: Table test/t1 has a primary key in InnoDB data dictionary, but not in MariaDB!
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MariaDB
select * from t1;
pk i
1 1
2 2
alter table t1 add j int;
Warnings:
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MariaDB
show warnings;
Level Code Message
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MariaDB
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/innodb/t/innodb-corrupted-table.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# MDEV-9918: [ERROR] mysqld got signal 11 during ALTER TABLE `name` COLUMN ADD
#

call mtr.add_suppression("Table .* has a primary key in InnoDB data dictionary, but not in MySQL.*");
call mtr.add_suppression("InnoDB: Table .* contains .* indexes inside InnoDB, which is different from the number of indexes .* defined in the MySQL.*");
call mtr.add_suppression("Table .* has a primary key in InnoDB data dictionary, but not in MariaDB.*");
call mtr.add_suppression("InnoDB: Table .* contains .* indexes inside InnoDB, which is different from the number of indexes .* defined in the MariaDB.*");

create table t1 (pk int, i int, key(i)) engine=InnoDB;
insert into t1 values (1,1),(2,2);
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/sys_vars/r/sysvars_innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE crc32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The algorithm InnoDB uses for page checksumming. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Files updated when this option is set to crc32 or strict_crc32 will not be readable by MySQL versions older than 5.6.3
VARIABLE_COMMENT The algorithm InnoDB uses for page checksumming. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Files updated when this option is set to crc32 or strict_crc32 will not be readable by InnoDB versions older than 5.6.3
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
Expand Down Expand Up @@ -1930,7 +1930,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Print all deadlocks to MySQL error log (off by default)
VARIABLE_COMMENT Print all deadlocks to MariaDB error log (off by default)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
Expand Down
58 changes: 29 additions & 29 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4976,7 +4976,7 @@ innobase_commit(

if (!trx_is_registered_for_2pc(trx) && trx_is_started(trx)) {

sql_print_error("Transaction not registered for MySQL 2PC,"
sql_print_error("Transaction not registered for MariaDB 2PC,"
" but transaction is active");
}

Expand Down Expand Up @@ -5490,7 +5490,7 @@ innobase_close_connection(

if (!trx_is_registered_for_2pc(trx) && trx_is_started(trx)) {

sql_print_error("Transaction not registered for MySQL 2PC, "
sql_print_error("Transaction not registered for MariaDB 2PC, "
"but transaction is active");
}

Expand All @@ -5511,7 +5511,7 @@ innobase_close_connection(
}
} else {
sql_print_warning(
"MySQL is closing a connection that has an active "
"MariaDB is closing a connection that has an active "
"InnoDB transaction. " TRX_ID_FMT " row modifications "
"will roll back.",
" row modifications will roll back.",
Expand Down Expand Up @@ -6485,7 +6485,7 @@ innobase_build_index_translation(
if (!innobase_match_index_columns(&table->key_info[count],
index_mapping[count])) {
sql_print_error("Found index %s whose column info"
" does not match that of MySQL.",
" does not match that of MariaDB.",
table->key_info[count].name);
ret = false;
goto func_exit;
Expand Down Expand Up @@ -6670,7 +6670,7 @@ ha_innobase::innobase_initialize_autoinc()
break;
}
case DB_RECORD_NOT_FOUND:
ib::error() << "MySQL and InnoDB data dictionaries are"
ib::error() << "MariaDB and InnoDB data dictionaries are"
" out of sync. Unable to find the AUTOINC"
" column " << col_name << " in the InnoDB"
" table " << index->table->name << ". We set"
Expand Down Expand Up @@ -6773,7 +6773,7 @@ ha_innobase::open(
ib::warn() << "Table " << norm_name << " contains "
<< dict_table_get_n_user_cols(ib_table) << " user"
" defined columns in InnoDB, but " << table->s->stored_fields
<< " columns in MySQL. Please check"
<< " columns in MariaDB. Please check"
" INFORMATION_SCHEMA.INNODB_SYS_COLUMNS and " REFMAN
"innodb-troubleshooting.html for how to resolve the"
" issue.";
Expand Down Expand Up @@ -7362,7 +7362,7 @@ wsrep_innobase_mysql_sort(

if (charset == NULL) {
sql_print_error("InnoDB needs charset %lu for doing "
"a comparison, but MySQL cannot "
"a comparison, but MariaDB cannot "
"find that charset.",
(ulong) charset_number);
ut_a(0);
Expand Down Expand Up @@ -11527,7 +11527,7 @@ ha_innobase::wsrep_append_keys(
keyval1[0] = (char)i;

if (!tab) {
WSREP_WARN("MySQL-InnoDB key mismatch %s %s",
WSREP_WARN("MariaDB-InnoDB key mismatch %s %s",
table->s->table_name.str,
key_info->name);
}
Expand Down Expand Up @@ -12403,7 +12403,7 @@ create_index(
case DATA_DOUBLE:
case DATA_DECIMAL:
sql_print_error(
"MySQL is trying to create a column"
"MariaDB is trying to create a column"
" prefix index field, on an"
" inappropriate data type. Table"
" name %s, column name %s.",
Expand Down Expand Up @@ -14602,9 +14602,9 @@ ha_innobase::delete_table(
tbl_name.m_name = norm_name;
ib::error() << "Table " << tbl_name <<
" does not exist in the InnoDB"
" internal data dictionary though MySQL is"
" internal data dictionary though MariaDB is"
" trying to drop it. Have you copied the .frm"
" file of the table to the MySQL database"
" file of the table to the MariaDB database"
" directory from another database? "
<< TROUBLESHOOTING_MSG;
}
Expand Down Expand Up @@ -15204,9 +15204,9 @@ innobase_rename_table(
if (error == DB_TABLE_NOT_FOUND) {
ib::error() << "Table " << ut_get_name(trx, norm_from)
<< " does not exist in the InnoDB internal"
" data dictionary though MySQL is trying to"
" data dictionary though MariaDB is trying to"
" rename the table. Have you copied the .frm"
" file of the table to the MySQL database"
" file of the table to the MariaDB database"
" directory from another database? "
<< TROUBLESHOOTING_MSG;
}
Expand Down Expand Up @@ -15832,7 +15832,7 @@ innobase_get_mysql_key_number_for_index(
if (index->is_committed()) {
sql_print_warning(
"Found index %s in InnoDB index list"
" but not its MySQL index number."
" but not its MariaDB index number."
" It could be an InnoDB internal"
" index.",
index->name());
Expand Down Expand Up @@ -15954,7 +15954,7 @@ ha_innobase::info_low(
/* In case MySQL calls this in the middle of a SELECT query, release
possible adaptive hash latch to avoid deadlocks of threads */

m_prebuilt->trx->op_info = (char*)"returning various info to MySQL";
m_prebuilt->trx->op_info = (char*)"returning various info to MariaDB";

trx_search_latch_release_if_reserved(m_prebuilt->trx);

Expand Down Expand Up @@ -15991,7 +15991,7 @@ ha_innobase::info_low(
}

m_prebuilt->trx->op_info =
"returning various info to MySQL";
"returning various info to MariaDB";
}


Expand Down Expand Up @@ -16211,7 +16211,7 @@ ha_innobase::info_low(
sql_print_error(
"Index %s of %s has %lu columns"
" unique inside InnoDB, but"
" MySQL is asking statistics for"
" MariaDB is asking statistics for"
" %lu columns. Have you mixed"
" up .frm files from different"
" installations? %s",
Expand Down Expand Up @@ -19194,7 +19194,7 @@ innobase_xa_prepare(

if (!trx_is_registered_for_2pc(trx) && trx_is_started(trx)) {

sql_print_error("Transaction not registered for MySQL 2PC,"
sql_print_error("Transaction not registered for MariaDB 2PC,"
" but transaction is active");
}

Expand Down Expand Up @@ -21878,7 +21878,7 @@ static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm,
" write a constant magic number, do not allow values other than that"
" magic number when reading;"
" Files updated when this option is set to crc32 or strict_crc32 will"
" not be readable by MySQL versions older than 5.6.3",
" not be readable by InnoDB versions older than 5.6.3",
NULL, NULL, SRV_CHECKSUM_ALGORITHM_CRC32,
&innodb_checksum_algorithm_typelib);

Expand Down Expand Up @@ -22850,7 +22850,7 @@ static MYSQL_SYSVAR_BOOL(status_output_locks, srv_print_innodb_lock_monitor,

static MYSQL_SYSVAR_BOOL(print_all_deadlocks, srv_print_all_deadlocks,
PLUGIN_VAR_OPCMDARG,
"Print all deadlocks to MySQL error log (off by default)",
"Print all deadlocks to MariaDB error log (off by default)",
NULL, NULL, FALSE);

static MYSQL_SYSVAR_ULONG(compression_failure_threshold_pct,
Expand Down Expand Up @@ -24389,7 +24389,7 @@ ib_push_frm_error(
case DICT_FRM_NO_PK:
sql_print_error("Table %s has a primary key in "
"InnoDB data dictionary, but not "
"in MySQL!"
"in MariaDB!"
" Have you mixed up "
".frm files from different "
"installations? See "
Expand All @@ -24403,17 +24403,17 @@ ib_push_frm_error(
"InnoDB: Table %s has a "
"primary key in InnoDB data "
"dictionary, but not in "
"MySQL!", ib_table->name);
"MariaDB!", ib_table->name);
}
break;
case DICT_NO_PK_FRM_HAS:
sql_print_error(
"Table %s has no primary key in InnoDB data "
"dictionary, but has one in MySQL! If you "
"created the table with a MySQL version < "
"dictionary, but has one in MariaDB! If you "
"created the table with a MariaDB version < "
"3.23.54 and did not define a primary key, "
"but defined a unique key with all non-NULL "
"columns, then MySQL internally treats that "
"columns, then MariaDB internally treats that "
"key as the primary key. You can fix this "
"error by dump + DROP + CREATE + reimport "
"of the table.", ib_table->name);
Expand All @@ -24424,7 +24424,7 @@ ib_push_frm_error(
"InnoDB: Table %s has no "
"primary key in InnoDB data "
"dictionary, but has one in "
"MySQL!",
"MariaDB!",
ib_table->name);
}
break;
Expand All @@ -24433,7 +24433,7 @@ ib_push_frm_error(
sql_print_error("InnoDB: Table %s contains %lu "
"indexes inside InnoDB, which "
"is different from the number of "
"indexes %u defined in the MySQL "
"indexes %u defined in the MariaDB "
" Have you mixed up "
".frm files from different "
"installations? See "
Expand All @@ -24448,7 +24448,7 @@ ib_push_frm_error(
"InnoDB: Table %s contains %lu "
"indexes inside InnoDB, which "
"is different from the number of "
"indexes %u defined in the MySQL ",
"indexes %u defined in the MariaDB ",
ib_table->name, n_keys,
table->s->keys);
}
Expand All @@ -24457,7 +24457,7 @@ ib_push_frm_error(
case DICT_FRM_CONSISTENT:
default:
sql_print_error("InnoDB: Table %s is consistent "
"on InnoDB data dictionary and MySQL "
"on InnoDB data dictionary and MariaDB "
" FRM file.",
ib_table->name);
ut_error;
Expand Down

0 comments on commit 0852cf5

Please sign in to comment.