sql_print_error("MySQL synchronous replication was not able to send the binlog to the slave within the timeout %lu. We assume that the slave has become inaccessible, and switch off synchronous replication until the communication to the slave works again. MySQL synchronous replication has sent binlog to the slave up to file %s, position %lu. This transaction needs it to be sent up to file %s, position %lu.",thd->variables.sync_replication_timeout,innobase_repl_file_name,(ulong)innobase_repl_pos,trx->repl_wait_binlog_name,(ulong)trx->repl_wait_binlog_pos);
sql_print_error("MySQL synchronous replication was "
sql_print_error("MySQL synchronous replication has sent binlog to the slave up to file %s, position %lu, but now MySQL reports that it sent the binlog only up to file %s, position %lu",innobase_repl_file_name,(ulong)innobase_repl_pos,log_file_name,(ulong)end_offset);
sql_print_error("MySQL synchronous replication has "
"sent binlog to the slave up to file "
"%s, position %lu, but now MySQL "
"reports that it sent the binlog only "
"up to file %s, position %lu",
innobase_repl_file_name,
(ulong)innobase_repl_pos,
log_file_name,(ulong)end_offset);
}
}
}
}
...
@@ -2183,7 +2212,8 @@ innobase_close_connection(
...
@@ -2183,7 +2212,8 @@ innobase_close_connection(
if(trx->active_trans==0
if(trx->active_trans==0
&&trx->conc_state!=TRX_NOT_STARTED){
&&trx->conc_state!=TRX_NOT_STARTED){
sql_print_error("trx->active_trans == 0, but trx->conc_state != TRX_NOT_STARTED");
sql_print_error("trx->active_trans == 0, but trx->conc_state != "
"TRX_NOT_STARTED");
}
}
...
@@ -2344,15 +2374,17 @@ ha_innobase::open(
...
@@ -2344,15 +2374,17 @@ ha_innobase::open(
norm_name,NULL);
norm_name,NULL);
if(NULL==ib_table){
if(NULL==ib_table){
ut_print_timestamp(stderr);
ut_print_timestamp(stderr);
fprintf(stderr," InnoDB error:\n"
sql_print_error("Cannot find table %s from the internal data "
"Cannot find table %s from the internal data dictionary\n"
"dictionary\nof InnoDB though the .frm file "
"of InnoDB though the .frm file for the table exists. Maybe you\n"
"for the table exists. Maybe you\nhave "
"have deleted and recreated InnoDB data files but have forgotten\n"
"deleted and recreated InnoDB data files but "
"to delete the corresponding .frm files of InnoDB tables, or you\n"
"have forgotten\nto delete the corresponding "
"have moved .frm files to another database?\n"
".frm files of InnoDB tables, or you\n"
"Look from section 15.1 of http://www.innodb.com/ibman.html\n"
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 < 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 key as the primary key. You can fix this error by dump + DROP + CREATE + reimport of the table.",name);
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 < "
"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 "
"key as the primary key. You can fix this "
"error by dump + DROP + CREATE + reimport "
"of the table.",name);
}
}
((row_prebuilt_t*)innobase_prebuilt)
((row_prebuilt_t*)innobase_prebuilt)
...
@@ -2426,7 +2468,9 @@ ha_innobase::open(
...
@@ -2426,7 +2468,9 @@ ha_innobase::open(
and it will never be updated anyway. */
and it will never be updated anyway. */
if(key_used_on_scan!=MAX_KEY){
if(key_used_on_scan!=MAX_KEY){
sql_print_warning("Table %s key_used_on_scan is %lu even though there is no primary key inside InnoDB.",name,(ulong)key_used_on_scan);
sql_print_warning("Table %s key_used_on_scan is %lu even "
"though there is no primary key inside "
"InnoDB.",name,(ulong)key_used_on_scan);
}
}
}
}
...
@@ -2581,7 +2625,10 @@ innobase_mysql_cmp(
...
@@ -2581,7 +2625,10 @@ innobase_mysql_cmp(
charset=get_charset(charset_number,MYF(MY_WME));
charset=get_charset(charset_number,MYF(MY_WME));
if(charset==NULL){
if(charset==NULL){
sql_print_error("InnoDB needs charset %lu for doing a comparison, but MySQL cannot find that charset.",(ulong)charset_number);
sql_print_error("InnoDB needs charset %lu for doing "
sql_print_error("The transaction object for the table handle is at %p, but for the current thread it is at %p",prebuilt->trx,(trx_t*)current_thd->ha_data[innobase_hton.slot]);
sql_print_error("The transaction object for the table handle is at "
sql_print_error("MySQL is trying to create a column prefix index field, on an inappropriate data type. Table name %s, column name %s.",table_name,key_part->field->field_name);
sql_print_error("MySQL is trying to create a column "
"prefix index field, on an "
"inappropriate data type. Table "
"name %s, column name %s.",
table_name,
key_part->field->field_name);
prefix_len=0;
prefix_len=0;
}
}
...
@@ -5385,7 +5443,14 @@ ha_innobase::info(
...
@@ -5385,7 +5443,14 @@ ha_innobase::info(
for(i=0;i<table->s->keys;i++){
for(i=0;i<table->s->keys;i++){
if(index==NULL){
if(index==NULL){
ut_print_timestamp(stderr);
ut_print_timestamp(stderr);
sql_print_error("Table %s contains less indexes inside InnoDB than are defined in the MySQL .frm file. Have you mixed up .frm files from different installations? See section 15.1 at http://www.innodb.com/ibman.html",ib_table->name);
sql_print_error("Table %s contains less "
"indexes inside InnoDB than "
"are defined in the MySQL "
".frm file. Have you mixed up "
".frm files from different "
"installations? See section "
"15.1 at http://www.innodb.com/ibman.html",
ib_table->name);
break;
break;
}
}
...
@@ -5393,7 +5458,21 @@ ha_innobase::info(
...
@@ -5393,7 +5458,21 @@ ha_innobase::info(
if(j+1>index->n_uniq){
if(j+1>index->n_uniq){
ut_print_timestamp(stderr);
ut_print_timestamp(stderr);
sql_print_error("Index %s of %s has %lu columns unique inside InnoDB, but MySQL is asking statistics for %lu columns. Have you mixed up .frm files from different installations? See section 15.1 at http://www.innodb.com/ibman.html",index->name,ib_table->name,(unsignedlong)index->n_uniq,j+1);
sql_print_error("Index %s of %s has "
"%lu columns unique "
"inside InnoDB, but "
"MySQL is asking "
"statistics for %lu "
"columns. Have you "
"mixed up .frm files "
"from different "
"installations? See "
"section 15.1 at "
"http://www.innodb.com/ibman.html",
index->name,
ib_table->name,
(unsignedlong)
index->n_uniq,j+1);
break;
break;
}
}
...
@@ -5941,7 +6020,9 @@ ha_innobase::start_stmt(
...
@@ -5941,7 +6020,9 @@ ha_innobase::start_stmt(
if(prebuilt->stored_select_lock_type!=LOCK_S
if(prebuilt->stored_select_lock_type!=LOCK_S
&&prebuilt->stored_select_lock_type!=LOCK_X){
&&prebuilt->stored_select_lock_type!=LOCK_X){
sql_print_error("stored_select_lock_type is %lu inside ::start_stmt()!",prebuilt->stored_select_lock_type);
sql_print_error("stored_select_lock_type is %lu inside "