diff options
author | marko@hundin.mysql.fi <> | 2004-04-06 16:14:43 +0300 |
---|---|---|
committer | marko@hundin.mysql.fi <> | 2004-04-06 16:14:43 +0300 |
commit | 6af38c65bebe79e36aaa57c0b4f9a78f047bccad (patch) | |
tree | f7bc427aa7ce4a54802d6e8931ca1dfe64c7bfa8 /innobase/row | |
parent | 4f9b59f71db750cc2d14b0ed3a910b23996a9032 (diff) | |
download | mariadb-git-6af38c65bebe79e36aaa57c0b4f9a78f047bccad.tar.gz |
InnoDB: send diagnostic output to stderr or files
instead of stdout or fixed-size memory buffers
Diffstat (limited to 'innobase/row')
-rw-r--r-- | innobase/row/row0ins.c | 168 | ||||
-rw-r--r-- | innobase/row/row0mysql.c | 294 | ||||
-rw-r--r-- | innobase/row/row0purge.c | 6 | ||||
-rw-r--r-- | innobase/row/row0row.c | 21 | ||||
-rw-r--r-- | innobase/row/row0sel.c | 144 | ||||
-rw-r--r-- | innobase/row/row0umod.c | 33 | ||||
-rw-r--r-- | innobase/row/row0undo.c | 4 | ||||
-rw-r--r-- | innobase/row/row0upd.c | 32 |
8 files changed, 359 insertions, 343 deletions
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index 590d2b52e07..8bc6c9697c1 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -528,34 +528,37 @@ row_ins_foreign_report_err( dtuple_t* entry) /* in: index entry in the parent table */ { - char* buf = dict_foreign_err_buf; + FILE* ef = dict_foreign_err_file; mutex_enter(&dict_foreign_err_mutex); - ut_sprintf_timestamp(buf); - sprintf(buf + strlen(buf), " Transaction:\n"); - trx_print(buf + strlen(buf), thr_get_trx(thr)); - - sprintf(buf + strlen(buf), -"Foreign key constraint fails for table %.500s:\n", - foreign->foreign_table_name); - dict_print_info_on_foreign_key_in_create_format( - foreign, buf + strlen(buf)); - sprintf(buf + strlen(buf), "\n%s", errstr); - sprintf(buf + strlen(buf), -" in parent table, in index %.500s tuple:\n", - foreign->referenced_index->name); + rewind(ef); + ut_print_timestamp(ef); + fputs(" Transaction:\n", ef); + trx_print(ef, thr_get_trx(thr)); + + fputs("Foreign key constraint fails for table ", ef); + ut_print_name(ef, foreign->foreign_table_name); + fputs(":\n", ef); + dict_print_info_on_foreign_key_in_create_format(ef, foreign); + putc('\n', ef); + fputs(errstr, ef); + fputs(" in parent table, in index ", ef); + ut_print_name(ef, foreign->referenced_index->name); if (entry) { - dtuple_sprintf(buf + strlen(buf), 1000, entry); + fputs(" tuple:\n", ef); + dtuple_print(ef, entry); } - sprintf(buf + strlen(buf), -"\nBut in child table %.500s, in index %.500s, there is a record:\n", - foreign->foreign_table_name, foreign->foreign_index->name); + fputs("\nBut in child table ", ef); + ut_print_name(ef, foreign->foreign_table_name); + fputs(", in index ", ef); + ut_print_name(ef, foreign->foreign_index->name); if (rec) { - rec_sprintf(buf + strlen(buf), 1000, rec); + fputs(", there is a record:\n", ef); + rec_print(ef, rec); + } else { + fputs(", the record is not available\n", ef); } - sprintf(buf + strlen(buf), "\n"); - - ut_a(strlen(buf) < DICT_FOREIGN_ERR_BUF_LEN); + putc('\n', ef); mutex_exit(&dict_foreign_err_mutex); } @@ -576,28 +579,28 @@ row_ins_foreign_report_add_err( dtuple_t* entry) /* in: index entry to insert in the child table */ { - char* buf = dict_foreign_err_buf; + FILE* ef = dict_foreign_err_file; mutex_enter(&dict_foreign_err_mutex); - ut_sprintf_timestamp(buf); - sprintf(buf + strlen(buf), " Transaction:\n"); - trx_print(buf + strlen(buf), trx); - sprintf(buf + strlen(buf), -"Foreign key constraint fails for table %.500s:\n", - foreign->foreign_table_name); - dict_print_info_on_foreign_key_in_create_format( - foreign, buf + strlen(buf)); - sprintf(buf + strlen(buf), -"\nTrying to add in child table, in index %.500s tuple:\n", - foreign->foreign_index->name); + rewind(ef); + ut_print_timestamp(ef); + fputs(" Transaction:\n", ef); + trx_print(ef, trx); + fputs("Foreign key constraint fails for table ", ef); + ut_print_name(ef, foreign->foreign_table_name); + fputs(":\n", ef); + dict_print_info_on_foreign_key_in_create_format(ef, foreign); + fputs("\nTrying to add in child table, in index ", ef); + ut_print_name(ef, foreign->foreign_index->name); if (entry) { - dtuple_sprintf(buf + strlen(buf), 1000, entry); + fputs(" tuple:\n", ef); + dtuple_print(ef, entry); } - sprintf(buf + strlen(buf), -"\nBut in parent table %.500s, in index %.500s,\n" -"the closest match we can find is record:\n", - foreign->referenced_table_name, - foreign->referenced_index->name); + fputs("\nBut in parent table ", ef); + ut_print_name(ef, foreign->referenced_table_name); + fputs(", in index ", ef); + ut_print_name(ef, foreign->referenced_index->name); + fputs(",\nthe closest match we can find is record:\n", ef); if (rec && page_rec_is_supremum(rec)) { /* If the cursor ended on a supremum record, it is better to report the previous record in the error message, so that @@ -606,11 +609,9 @@ row_ins_foreign_report_add_err( } if (rec) { - rec_sprintf(buf + strlen(buf), 1000, rec); + rec_print(ef, rec); } - sprintf(buf + strlen(buf), "\n"); - - ut_a(strlen(buf) < DICT_FOREIGN_ERR_BUF_LEN); + putc('\n', ef); mutex_exit(&dict_foreign_err_mutex); } @@ -652,7 +653,6 @@ row_ins_foreign_check_on_constraint( ulint i; char* ptr; char table_name_buf[1000]; - char err_buf[1000]; ut_a(thr && foreign && pcur && mtr); @@ -791,20 +791,20 @@ row_ins_foreign_check_on_constraint( || btr_pcur_get_low_match(cascade->pcur) < dict_index_get_n_unique(clust_index)) { - fprintf(stderr, + fputs( "InnoDB: error in cascade of a foreign key op\n" - "InnoDB: index %s table %s\n", index->name, - index->table->name); - - rec_sprintf(err_buf, 900, rec); - fprintf(stderr, "InnoDB: record %s\n", err_buf); - - rec_sprintf(err_buf, 900, clust_rec); - fprintf(stderr, "InnoDB: clustered record %s\n", - err_buf); - fprintf(stderr, - "InnoDB: Make a detailed bug report and send it\n"); - fprintf(stderr, "InnoDB: to mysql@lists.mysql.com\n"); + "InnoDB: ", stderr); + dict_index_name_print(stderr, index); + + fputs("\n" + "InnoDB: record ", stderr); + rec_print(stderr, rec); + fputs("\n" + "InnoDB: clustered record ", stderr); + rec_print(stderr, clust_rec); + fputs("\n" + "InnoDB: Make a detailed bug report and send it\n" + "InnoDB: to mysql@lists.mysql.com\n", stderr); err = DB_SUCCESS; @@ -834,24 +834,6 @@ row_ins_foreign_check_on_constraint( /* This can happen if there is a circular reference of rows such that cascading delete comes to delete a row already in the process of being delete marked */ -/* - fprintf(stderr, - "InnoDB: error 2 in cascade of a foreign key op\n" - "InnoDB: index %s table %s\n", index->name, - index->table->name); - - rec_sprintf(err_buf, 900, rec); - fprintf(stderr, "InnoDB: record %s\n", err_buf); - - rec_sprintf(err_buf, 900, clust_rec); - fprintf(stderr, "InnoDB: clustered record %s\n", err_buf); - - fprintf(stderr, - "InnoDB: Make a detailed bug report and send it\n"); - fprintf(stderr, "InnoDB: to mysql@lists.mysql.com\n"); - - ut_error; -*/ err = DB_SUCCESS; goto nonstandard_exit_func; @@ -1022,7 +1004,6 @@ row_ins_check_foreign_constraint( int cmp; ulint err; ulint i; - char* buf = dict_foreign_err_buf; mtr_t mtr; run_again: @@ -1085,23 +1066,24 @@ run_again: if (check_table == NULL) { if (check_ref) { + FILE* ef = dict_foreign_err_file; mutex_enter(&dict_foreign_err_mutex); - ut_sprintf_timestamp(buf); - sprintf(buf + strlen(buf), " Transaction:\n"); - trx_print(buf + strlen(buf), thr_get_trx(thr)); - sprintf(buf + strlen(buf), -"Foreign key constraint fails for table %.500s:\n", - foreign->foreign_table_name); - dict_print_info_on_foreign_key_in_create_format( - foreign, buf + strlen(buf)); - sprintf(buf + strlen(buf), -"\nTrying to add to index %.500s tuple:\n", foreign->foreign_index->name); - dtuple_sprintf(buf + strlen(buf), 1000, entry); - sprintf(buf + strlen(buf), -"\nBut the parent table %.500s does not currently exist!\n", - foreign->referenced_table_name); - - ut_a(strlen(buf) < DICT_FOREIGN_ERR_BUF_LEN); + rewind(ef); + ut_print_timestamp(ef); + fputs(" Transaction:\n", ef); + trx_print(ef, thr_get_trx(thr)); + fputs("Foreign key constraint fails for table ", ef); + ut_print_name(ef, foreign->foreign_table_name); + fputs(":\n", ef); + dict_print_info_on_foreign_key_in_create_format(ef, + foreign); + fputs("\nTrying to add to index ", ef); + ut_print_name(ef, foreign->foreign_index->name); + fputs(" tuple:\n", ef); + dtuple_print(ef, entry); + fputs("\nBut the parent table ", ef); + ut_print_name(ef, foreign->referenced_table_name); + fputs(" does not currently exist!\n", ef); mutex_exit(&dict_foreign_err_mutex); return(DB_NO_REFERENCED_ROW); diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index eca586b3a0a..07c3f8c4867 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -296,22 +296,22 @@ handle_new_error: } else if (err == DB_MUST_GET_MORE_FILE_SPACE) { - fprintf(stderr, + fputs( "InnoDB: The database cannot continue operation because of\n" "InnoDB: lack of space. You must add a new data file to\n" - "InnoDB: my.cnf and restart the database.\n"); + "InnoDB: my.cnf and restart the database.\n", stderr); exit(1); } else if (err == DB_CORRUPTION) { - fprintf(stderr, + fputs( "InnoDB: We detected index corruption in an InnoDB type table.\n" "InnoDB: You have to dump + drop + reimport the table or, in\n" "InnoDB: a case of widespread corruption, dump all InnoDB\n" "InnoDB: tables and recreate the whole InnoDB tablespace.\n" "InnoDB: If the mysqld server crashes after the startup or when\n" "InnoDB: you dump the tables, look at section 6.1 of\n" - "InnoDB: http://www.innodb.com/ibman.html for help.\n"); + "InnoDB: http://www.innodb.com/ibman.php for help.\n", stderr); } else { fprintf(stderr, "InnoDB: unknown error code %lu\n", err); @@ -423,8 +423,10 @@ row_prebuilt_free( || prebuilt->magic_n2 != ROW_PREBUILT_ALLOCATED) { fprintf(stderr, "InnoDB: Error: trying to free a corrupt\n" -"InnoDB: table handle. Magic n %lu, magic n2 %lu, table name %s\n", - prebuilt->magic_n, prebuilt->magic_n2, prebuilt->table->name); +"InnoDB: table handle. Magic n %lu, magic n2 %lu, table name ", + prebuilt->magic_n, prebuilt->magic_n2); + ut_print_name(stderr, prebuilt->table->name); + putc('\n', stderr); mem_analyze_corruption((byte*)prebuilt); @@ -469,9 +471,9 @@ row_prebuilt_free( || (ROW_PREBUILT_FETCH_MAGIC_N != mach_read_from_4((prebuilt->fetch_cache[i]) + prebuilt->mysql_row_len))) { - fprintf(stderr, + fputs( "InnoDB: Error: trying to free a corrupt\n" - "InnoDB: fetch buffer.\n"); + "InnoDB: fetch buffer.\n", stderr); mem_analyze_corruption( prebuilt->fetch_cache[i]); @@ -514,8 +516,10 @@ row_update_prebuilt_trx( if (prebuilt->magic_n != ROW_PREBUILT_ALLOCATED) { fprintf(stderr, "InnoDB: Error: trying to use a corrupt\n" - "InnoDB: table handle. Magic n %lu, table name %s\n", - prebuilt->magic_n, prebuilt->table->name); + "InnoDB: table handle. Magic n %lu, table name ", + prebuilt->magic_n); + ut_print_name(stderr, prebuilt->table->name); + putc('\n', stderr); mem_analyze_corruption((byte*)prebuilt); @@ -741,8 +745,10 @@ row_insert_for_mysql( if (prebuilt->magic_n != ROW_PREBUILT_ALLOCATED) { fprintf(stderr, "InnoDB: Error: trying to free a corrupt\n" - "InnoDB: table handle. Magic n %lu, table name %s\n", - prebuilt->magic_n, prebuilt->table->name); + "InnoDB: table handle. Magic n %lu, table name ", + prebuilt->magic_n); + ut_print_name(stderr, prebuilt->table->name); + putc('\n', stderr); mem_analyze_corruption((byte*)prebuilt); @@ -750,12 +756,13 @@ row_insert_for_mysql( } if (srv_created_new_raw || srv_force_recovery) { - fprintf(stderr, + fputs( "InnoDB: A new raw disk partition was initialized or\n" "InnoDB: innodb_force_recovery is on: we do not allow\n" "InnoDB: database modifications by the user. Shut down\n" "InnoDB: mysqld and edit my.cnf so that newraw is replaced\n" - "InnoDB: with raw, and innodb_force_... is removed.\n"); + "InnoDB: with raw, and innodb_force_... is removed.\n", + stderr); return(DB_ERROR); } @@ -953,8 +960,10 @@ row_update_for_mysql( if (prebuilt->magic_n != ROW_PREBUILT_ALLOCATED) { fprintf(stderr, "InnoDB: Error: trying to free a corrupt\n" - "InnoDB: table handle. Magic n %lu, table name %s\n", - prebuilt->magic_n, prebuilt->table->name); + "InnoDB: table handle. Magic n %lu, table name ", + prebuilt->magic_n); + ut_print_name(stderr, prebuilt->table->name); + putc('\n', stderr); mem_analyze_corruption((byte*)prebuilt); @@ -962,12 +971,13 @@ row_update_for_mysql( } if (srv_created_new_raw || srv_force_recovery) { - fprintf(stderr, + fputs( "InnoDB: A new raw disk partition was initialized or\n" "InnoDB: innodb_force_recovery is on: we do not allow\n" "InnoDB: database modifications by the user. Shut down\n" "InnoDB: mysqld and edit my.cnf so that newraw is replaced\n" - "InnoDB: with raw, and innodb_force_... is removed.\n"); + "InnoDB: with raw, and innodb_force_... is removed.\n", + stderr); return(DB_ERROR); } @@ -1310,12 +1320,13 @@ row_create_table_for_mysql( ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); if (srv_created_new_raw) { - fprintf(stderr, + fputs( "InnoDB: A new raw disk partition was initialized or\n" "InnoDB: innodb_force_recovery is on: we do not allow\n" "InnoDB: database modifications by the user. Shut down\n" "InnoDB: mysqld and edit my.cnf so that newraw is replaced\n" - "InnoDB: with raw, and innodb_force_... is removed.\n"); + "InnoDB: with raw, and innodb_force_... is removed.\n", + stderr); trx_commit_for_mysql(trx); @@ -1390,16 +1401,17 @@ row_create_table_for_mysql( /* We define here a debugging feature intended for developers */ - printf("Validating InnoDB memory:\n" + fputs("Validating InnoDB memory:\n" "to use this feature you must compile InnoDB with\n" "UNIV_MEM_DEBUG defined in univ.i and the server must be\n" "quiet because allocation from a mem heap is not protected\n" - "by any semaphore.\n"); + "by any semaphore.\n", stderr); #ifdef UNIV_MEM_DEBUG ut_a(mem_validate()); - printf("Memory validated\n"); + fputs("Memory validated\n", stderr); #else /* UNIV_MEM_DEBUG */ - puts("Memory NOT validated (recompile with UNIV_MEM_DEBUG)"); + fputs("Memory NOT validated (recompile with UNIV_MEM_DEBUG)\n", + stderr); #endif /* UNIV_MEM_DEBUG */ } @@ -1424,30 +1436,29 @@ row_create_table_for_mysql( trx_general_rollback_for_mysql(trx, FALSE, NULL); if (err == DB_OUT_OF_FILE_SPACE) { - fprintf(stderr, - "InnoDB: Warning: cannot create table %s because tablespace full\n", - table->name); + fputs("InnoDB: Warning: cannot create table ", stderr); + ut_print_name(stderr, table->name); + fputs(" because tablespace full\n", stderr); row_drop_table_for_mysql(table->name, trx, FALSE); } else { ut_a(err == DB_DUPLICATE_KEY); ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Error: table %s already exists in InnoDB internal\n" + fputs(" InnoDB: Error: table ", stderr); + ut_print_name(stderr, table->name); + fputs(" already exists in InnoDB internal\n" "InnoDB: data dictionary. Have you deleted the .frm file\n" "InnoDB: and not used DROP TABLE? Have you used DROP DATABASE\n" "InnoDB: for InnoDB tables in MySQL version <= 3.23.43?\n" - "InnoDB: See the Restrictions section of the InnoDB manual.\n", - table->name); - fprintf(stderr, + "InnoDB: See the Restrictions section of the InnoDB manual.\n" "InnoDB: You can drop the orphaned table inside InnoDB by\n" "InnoDB: creating an InnoDB table with the same name in another\n" "InnoDB: database and moving the .frm file to the current database.\n" "InnoDB: Then MySQL thinks the table exists, and DROP TABLE will\n" "InnoDB: succeed.\n" - "InnoDB: You can look further help from section 15.1 of\n" - "InnoDB: http://www.innodb.com/ibman.html\n"); + "InnoDB: You can look for further help from section 15.1 of\n" + "InnoDB: http://www.innodb.com/ibman.php\n", stderr); } trx->error_state = DB_SUCCESS; @@ -1498,11 +1509,14 @@ row_create_index_for_mysql( ut_print_timestamp(stderr); - fprintf(stderr, -" InnoDB: Error: column %s appears twice in index %s of table %s\n" -"InnoDB: This is not allowed in InnoDB.\n", - dict_index_get_nth_field(index, i)->name, - index->name, index->table_name); + fputs(" InnoDB: Error: column ", stderr); + ut_print_name(stderr, + dict_index_get_nth_field(index, i)->name); + fputs(" appears twice in ", stderr); + dict_index_name_print(stderr, index); + fputs("\n" + "InnoDB: This is not allowed in InnoDB.\n", + stderr); err = DB_COL_APPEARS_TWICE_IN_INDEX; @@ -1634,16 +1648,19 @@ row_drop_table_for_mysql_in_background( trx = trx_allocate_for_background(); -/* fprintf(stderr, "InnoDB: Dropping table %s in background drop list\n", - name); */ +/* fputs("InnoDB: Error: Dropping table ", stderr); + ut_print_name(stderr, name); + fputs(" in background drop list\n", stderr); */ + /* Drop the table in InnoDB */ error = row_drop_table_for_mysql(name, trx, FALSE); if (error != DB_SUCCESS) { - fprintf(stderr, - "InnoDB: Error: Dropping table %s in background drop list failed\n", - name); + ut_print_timestamp(stderr); + fputs(" InnoDB: Error: Dropping table ", stderr); + ut_print_name(stderr, name); + fputs(" in background drop list failed\n", stderr); } /* Flush the log to reduce probability that the .frm files and @@ -1721,9 +1738,9 @@ already_dropped: UT_LIST_REMOVE(row_mysql_drop_list, row_mysql_drop_list, drop); ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Dropped table %s in background drop queue.\n", - drop->table_name); + fputs(" InnoDB: Dropped table ", stderr); + ut_print_name(stderr, drop->table_name); + fputs(" in background drop queue.\n", stderr); mem_free(drop->table_name); @@ -1782,15 +1799,17 @@ row_add_table_to_background_drop_list( UT_LIST_ADD_LAST(row_mysql_drop_list, row_mysql_drop_list, drop); -/* fprintf(stderr, "InnoDB: Adding table %s to background drop list\n", - drop->table_name); */ +/* fputs("InnoDB: Adding table ", stderr); + ut_print_name(stderr, drop->table_name); + fputs(" to background drop list\n", stderr); */ + mutex_exit(&kernel_mutex); } /************************************************************************* -Drops a table for MySQL. If the name of the dropped table ends to -characters INNODB_MONITOR, then this also stops printing of monitor -output by the master thread. */ +Drops a table for MySQL. If the name of the table to be dropped is equal +with one of the predefined magic table names, then this also stops printing +the corresponding monitor output by the master thread. */ int row_drop_table_for_mysql( @@ -1962,14 +1981,14 @@ row_drop_table_for_mysql( err = DB_TABLE_NOT_FOUND; ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Error: table %s does not exist in the InnoDB internal\n" + fputs(" InnoDB: Error: table ", stderr); + ut_print_name(stderr, name); + fputs(" does not exist in the InnoDB internal\n" "InnoDB: data dictionary though MySQL is trying to drop it.\n" "InnoDB: Have you copied the .frm file of the table to the\n" "InnoDB: MySQL database directory from another database?\n" - "InnoDB: You can look further help from section 15.1 of\n" - "InnoDB: http://www.innodb.com/ibman.html\n", - name); + "InnoDB: You can look for further help from section 15.1 of\n" + "InnoDB: http://www.innodb.com/ibman.php\n", stderr); goto funct_exit; } @@ -1985,7 +2004,7 @@ row_drop_table_for_mysql( if (foreign && trx->check_foreigns && !(drop_db && dict_tables_have_same_db( name, foreign->foreign_table_name))) { - char* buf = dict_foreign_err_buf; + FILE* ef = dict_foreign_err_file; /* We only allow dropping a referenced table if FOREIGN_KEY_CHECKS is set to 0 */ @@ -1993,28 +2012,30 @@ row_drop_table_for_mysql( err = DB_CANNOT_DROP_CONSTRAINT; mutex_enter(&dict_foreign_err_mutex); - ut_sprintf_timestamp(buf); - - sprintf(buf + strlen(buf), - " Cannot drop table %.500s\n", name); - sprintf(buf + strlen(buf), -"because it is referenced by %.500s\n", foreign->foreign_table_name); - - ut_a(strlen(buf) < DICT_FOREIGN_ERR_BUF_LEN); - + rewind(ef); + ut_print_timestamp(ef); + + fputs(" Cannot drop table ", ef); + ut_print_name(ef, name); + fputs("\n" + "because it is referenced by ", ef); + ut_print_name(ef, foreign->foreign_table_name); + putc('\n', ef); mutex_exit(&dict_foreign_err_mutex); goto funct_exit; } if (table->n_mysql_handles_opened > 0) { - + ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Warning: MySQL is trying to drop table %s\n" + fputs(" InnoDB: Warning: MySQL is trying to drop table ", + stderr); + ut_print_name(stderr, table->name); + fputs("\n" "InnoDB: though there are still open handles to it.\n" "InnoDB: Adding the table to the background drop queue.\n", - table->name); + stderr); row_add_table_to_background_drop_list(table); @@ -2024,13 +2045,14 @@ row_drop_table_for_mysql( } if (table->n_foreign_key_checks_running > 0) { - + ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: You are trying to drop table %s\n" + fputs(" InnoDB: You are trying to drop table ", stderr); + ut_print_name(stderr, table->name); + fputs("\n" "InnoDB: though there are foreign key check running on it.\n" "InnoDB: Adding the table to the background drop queue.\n", - table->name); + stderr); row_add_table_to_background_drop_list(table); @@ -2065,9 +2087,11 @@ row_drop_table_for_mysql( if (dict_load_table(name) != NULL) { ut_print_timestamp(stderr); - fprintf(stderr, -" InnoDB: Error: dropping of table %s failed!\n", name); - + fputs(" InnoDB: Error: dropping of table ", + stderr); + ut_print_name(stderr, name); + fputs(" failed!\n", stderr); + err = DB_ERROR; } } funct_exit: @@ -2125,10 +2149,13 @@ loop: row_mysql_unlock_data_dictionary(trx); ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Warning: MySQL is trying to drop database %s\n" - "InnoDB: though there are still open handles to table %s.\n", - name, table_name); + fputs( + " InnoDB: Warning: MySQL is trying to drop database ", stderr); + ut_print_name(stderr, name); + fputs("\n" + "InnoDB: though there are still open handles to table ", stderr); + ut_print_name(stderr, table_name); + fputs(".\n", stderr); os_thread_sleep(1000000); @@ -2142,9 +2169,12 @@ loop: mem_free(table_name); if (err != DB_SUCCESS) { - fprintf(stderr, - "InnoDB: DROP DATABASE %s failed with error %lu for table %s\n", - name, (ulint)err, table_name); + fputs("InnoDB: DROP DATABASE ", stderr); + ut_print_name(stderr, name); + fprintf(stderr, " failed with error %lu for table ", + (ulint) err); + ut_print_name(stderr, table_name); + putc('\n', stderr); break; } } @@ -2309,12 +2339,10 @@ row_rename_table_for_mysql( if (row_mysql_is_recovered_tmp_table(new_name)) { recovering_temp_table = TRUE; - } - - /* Serialize data dictionary operations with dictionary mutex: - no deadlocks can occur then in these operations */ + } else { + /* Serialize data dictionary operations with dictionary mutex: + no deadlocks can occur then in these operations */ - if (!recovering_temp_table) { row_mysql_lock_data_dictionary(trx); } @@ -2450,25 +2478,26 @@ row_rename_table_for_mysql( if (err == DB_DUPLICATE_KEY) { ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Error: table %s exists in the InnoDB internal data\n" - "InnoDB: dictionary though MySQL is trying rename table %s to it.\n" + fputs(" InnoDB: Error: table ", stderr); + ut_print_name(stderr, new_name); + fputs(" exists in the InnoDB internal data\n" + "InnoDB: dictionary though MySQL is trying rename table ", stderr); + ut_print_name(stderr, old_name); + fputs(" to it.\n" "InnoDB: Have you deleted the .frm file and not used DROP TABLE?\n" - "InnoDB: You can look further help from section 15.1 of\n" - "InnoDB: http://www.innodb.com/ibman.html\n", - new_name, old_name); - - fprintf(stderr, - "InnoDB: If table %s is a temporary table #sql..., then it can be that\n" + "InnoDB: You can look for further help from section 15.1 of\n" + "InnoDB: http://www.innodb.com/ibman.php\n" + "InnoDB: If table ", stderr); + ut_print_name(stderr, new_name); + fputs( + " is a temporary table #sql..., then it can be that\n" "InnoDB: there are still queries running on the table, and it will be\n" - "InnoDB: dropped automatically when the queries end.\n", new_name); - - fprintf(stderr, + "InnoDB: dropped automatically when the queries end.\n" "InnoDB: You can drop the orphaned table inside InnoDB by\n" "InnoDB: creating an InnoDB table with the same name in another\n" "InnoDB: database and moving the .frm file to the current database.\n" "InnoDB: Then MySQL thinks the table exists, and DROP TABLE will\n" - "InnoDB: succeed.\n"); + "InnoDB: succeed.\n", stderr); } trx->error_state = DB_SUCCESS; @@ -2493,11 +2522,13 @@ row_rename_table_for_mysql( ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Error: in ALTER TABLE table %s\n" + fputs(" InnoDB: Error: in ALTER TABLE table ", + stderr); + ut_print_name(stderr, new_name); + fputs("\n" "InnoDB: has or is referenced in foreign key constraints\n" "InnoDB: which are not compatible with the new table definition.\n", - new_name); + stderr); ut_a(dict_table_rename_in_cache(table, old_name, FALSE)); @@ -2554,7 +2585,6 @@ row_scan_and_check_index( int cmp; ibool contains_null; ulint i; - char err_buf[1000]; *n_rows = 0; @@ -2615,32 +2645,25 @@ loop: } if (cmp > 0) { - fprintf(stderr, - "Error: index records in a wrong order in index %s\n", - index->name); - - dtuple_sprintf(err_buf, 900, prev_entry); - fprintf(stderr, "InnoDB: prev record %s\n", err_buf); - - rec_sprintf(err_buf, 900, rec); - fprintf(stderr, "InnoDB: record %s\n", err_buf); - + fputs("InnoDB: index records in a wrong order in ", + stderr); + not_ok: + dict_index_name_print(stderr, index); + fputs("\n" + "InnoDB: prev record ", stderr); + dtuple_print(stderr, prev_entry); + fputs("\n" + "InnoDB: record ", stderr); + rec_print(stderr, rec); + putc('\n', stderr); is_ok = FALSE; } else if ((index->type & DICT_UNIQUE) && !contains_null && matched_fields >= dict_index_get_n_ordering_defined_by_user(index)) { - fprintf(stderr, "Error: duplicate key in index %s\n", - index->name); - - dtuple_sprintf(err_buf, 900, prev_entry); - fprintf(stderr, "InnoDB: prev record %s\n", err_buf); - - rec_sprintf(err_buf, 900, rec); - fprintf(stderr, "InnoDB: record %s\n", err_buf); - - is_ok = FALSE; + fputs("InnoDB: duplicate key in ", stderr); + goto not_ok; } } @@ -2684,7 +2707,9 @@ row_check_table_for_mysql( index = dict_table_get_first_index(table); while (index != NULL) { - /* fprintf(stderr, "Validating index %s\n", index->name); */ + /* fputs("Validating index ", stderr); + ut_print_name(stderr, index->name); + putc('\n', stderr); */ if (!btr_validate_tree(index->tree)) { ret = DB_ERROR; @@ -2694,18 +2719,21 @@ row_check_table_for_mysql( ret = DB_ERROR; } - /* fprintf(stderr, "%lu entries in index %s\n", n_rows, - index->name); */ + /* fprintf(stderr, "%lu entries in index ", n_rows); + ut_print_name(stderr, index->name); + putc('\n', stderr); */ if (index == dict_table_get_first_index(table)) { n_rows_in_table = n_rows; } else if (n_rows != n_rows_in_table) { ret = DB_ERROR; - + + fputs("InnoDB: Error: ", stderr); + dict_index_name_print(stderr, index); fprintf(stderr, - "Error: index %s contains %lu entries, should be %lu\n", - index->name, n_rows, n_rows_in_table); + " contains %lu entries, should be %lu\n", + n_rows, n_rows_in_table); } } diff --git a/innobase/row/row0purge.c b/innobase/row/row0purge.c index a2c60079e66..2ddc60613fc 100644 --- a/innobase/row/row0purge.c +++ b/innobase/row/row0purge.c @@ -158,7 +158,7 @@ row_purge_remove_clust_if_poss( ibool success; ulint n_tries = 0; -/* printf("Purge: Removing clustered record\n"); */ +/* fputs("Purge: Removing clustered record\n", stderr); */ success = row_purge_remove_clust_if_poss_low(node, BTR_MODIFY_LEAF); if (success) { @@ -212,7 +212,7 @@ row_purge_remove_sec_if_poss_low( if (!found) { /* Not found */ - /* printf("PURGE:........sec entry not found\n"); */ + /* fputs("PURGE:........sec entry not found\n", stderr); */ /* dtuple_print(entry); */ btr_pcur_close(&pcur); @@ -281,7 +281,7 @@ row_purge_remove_sec_if_poss( ibool success; ulint n_tries = 0; -/* printf("Purge: Removing secondary record\n"); */ +/* fputs("Purge: Removing secondary record\n", stderr); */ success = row_purge_remove_sec_if_poss_low(node, index, entry, BTR_MODIFY_LEAF); diff --git a/innobase/row/row0row.c b/innobase/row/row0row.c index 327a47f4009..680539764fd 100644 --- a/innobase/row/row0row.c +++ b/innobase/row/row0row.c @@ -390,7 +390,6 @@ row_build_row_ref_in_tuple( at least s-latched and the latch held as long as the row reference is used! */ { - dict_table_t* table; dict_index_t* clust_index; dfield_t* dfield; byte* field; @@ -401,21 +400,21 @@ row_build_row_ref_in_tuple( ut_a(ref && index && rec); - table = index->table; - - if (!table) { - fprintf(stderr, "InnoDB: table %s for index %s not found\n", - index->table_name, index->name); + if (!index->table) { + fputs("InnoDB: table ", stderr); + notfound: + ut_print_name(stderr, index->table_name); + fputs(" for index ", stderr); + ut_print_name(stderr, index->name); + fputs(" not found\n", stderr); ut_error; } - clust_index = dict_table_get_first_index(table); + clust_index = dict_table_get_first_index(index->table); if (!clust_index) { - fprintf(stderr, - "InnoDB: clust index for table %s for index %s not found\n", - index->table_name, index->name); - ut_error; + fputs("InnoDB: clust index for table ", stderr); + goto notfound; } ref_len = dict_index_get_n_unique(clust_index); diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index 6ae4f791205..6f8ce120764 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -1756,7 +1756,7 @@ row_sel_step( return(NULL); } else { /* SQL error detected */ - printf("SQL error %lu\n", err); + fprintf(stderr, "SQL error %lu\n", err); que_thr_handle_error(thr, DB_ERROR, NULL, 0); @@ -1806,7 +1806,7 @@ fetch_step( if (sel_node->state == SEL_NODE_CLOSED) { /* SQL error detected */ - printf("SQL error %lu\n", (ulint)DB_ERROR); + fprintf(stderr, "SQL error %lu\n", (ulint)DB_ERROR); que_thr_handle_error(thr, DB_ERROR, NULL, 0); @@ -1867,12 +1867,12 @@ row_printf_step( while (arg) { dfield_print_also_hex(que_node_get_val(arg)); - printf(" ::: "); + fputs(" ::: ", stderr); arg = que_node_get_next(arg); } - printf("\n"); + putc('\n', stderr); /* Fetch next row to print */ @@ -1980,9 +1980,10 @@ row_sel_convert_mysql_key_to_innobase( MySQL */ if (key_ptr[data_offset + 1] != 0) { ut_print_timestamp(stderr); - fprintf(stderr, -" InnoDB: Error: BLOB or TEXT prefix > 255 bytes in query to table %s\n", - index->table_name); + fputs( +" InnoDB: Error: BLOB or TEXT prefix > 255 bytes in query to table ", stderr); + ut_print_name(stderr, index->table_name); + putc('\n', stderr); } data_len = key_ptr[data_offset]; @@ -2058,20 +2059,18 @@ row_sel_store_row_id_to_prebuilt( { byte* data; ulint len; - char err_buf[1000]; - data = rec_get_nth_field(index_rec, dict_index_get_sys_col_pos(index, DATA_ROW_ID), &len); if (len != DATA_ROW_ID_LEN) { - rec_sprintf(err_buf, 900, index_rec); - fprintf(stderr, -"InnoDB: Error: Row id field is wrong length %lu in table %s index %s\n" -"InnoDB: Field number %lu, record:\n%s\n", - len, index->table_name, index->name, - dict_index_get_sys_col_pos(index, DATA_ROW_ID), - err_buf); +"InnoDB: Error: Row id field is wrong length %lu in ", len); + dict_index_name_print(stderr, index); + fprintf(stderr, "\n" +"InnoDB: Field number %lu, record:\n", + dict_index_get_sys_col_pos(index, DATA_ROW_ID)); + rec_print(stderr, index_rec); + putc('\n', stderr); ut_error; } @@ -2239,9 +2238,11 @@ row_sel_store_mysql_rec( templ->mysql_col_len); if (!templ->mysql_null_bit_mask) { - fprintf(stderr, + fputs( "InnoDB: Error: trying to return an SQL NULL field in a non-null\n" -"innoDB: column! Table name %s\n", prebuilt->table->name); +"innoDB: column! Table name ", stderr); + ut_print_name(stderr, prebuilt->table->name); + putc('\n', stderr); } else { mysql_rec[templ->mysql_null_byte_offset] |= (byte) (templ->mysql_null_bit_mask); @@ -2310,8 +2311,7 @@ row_sel_get_clust_rec_for_mysql( rec_t* old_vers; ulint err; trx_t* trx; - char err_buf[1000]; - + *out_rec = NULL; row_build_row_ref_in_tuple(prebuilt->clust_ref, sec_index, rec); @@ -2344,26 +2344,22 @@ row_sel_get_clust_rec_for_mysql( || prebuilt->select_lock_type != LOCK_NONE) { ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: error clustered record for sec rec not found\n" - "InnoDB: index %s table %s\n", sec_index->name, - sec_index->table->name); - - rec_sprintf(err_buf, 900, rec); - fprintf(stderr, - "InnoDB: sec index record %s\n", err_buf); - - rec_sprintf(err_buf, 900, clust_rec); - fprintf(stderr, - "InnoDB: clust index record %s\n", err_buf); - - trx = thr_get_trx(thr); - trx_print(err_buf, trx); - - fprintf(stderr, - "%s\nInnoDB: Make a detailed bug report and send it\n", - err_buf); - fprintf(stderr, "InnoDB: to mysql@lists.mysql.com\n"); + fputs(" InnoDB: error clustered record" + " for sec rec not found\n" + "InnoDB: ", stderr); + dict_index_name_print(stderr, sec_index); + fputs("\n" + "InnoDB: sec index record ", stderr); + rec_print(stderr, rec); + fputs("\n" + "InnoDB: clust index record ", stderr); + rec_print(stderr, clust_rec); + putc('\n', stderr); + trx_print(stderr, thr_get_trx(thr)); + + fputs("\n" + "InnoDB: Make a detailed bug report and send it\n" + "InnoDB: to mysql@lists.mysql.com\n", stderr); } clust_rec = NULL; @@ -2711,18 +2707,20 @@ row_search_for_mysql( if (prebuilt->magic_n != ROW_PREBUILT_ALLOCATED) { fprintf(stderr, "InnoDB: Error: trying to free a corrupt\n" - "InnoDB: table handle. Magic n %lu, table name %s\n", - prebuilt->magic_n, prebuilt->table->name); + "InnoDB: table handle. Magic n %lu, table name ", + prebuilt->magic_n); + ut_print_name(stderr, prebuilt->table->name); + putc('\n', stderr); mem_analyze_corruption((byte*)prebuilt); ut_error; } -/* printf("Match mode %lu\n search tuple ", match_mode); +/* fprintf(stderr, "Match mode %lu\n search tuple ", match_mode); dtuple_print(search_tuple); - printf("N tables locked %lu\n", trx->mysql_n_tables_locked); + fprintf(stderr, "N tables locked %lu\n", trx->mysql_n_tables_locked); */ /*-------------------------------------------------------------*/ /* PHASE 0: Release a possible s-latch we are holding on the @@ -2899,7 +2897,8 @@ row_search_for_mysql( mtr_commit(&mtr); - /* printf("%s shortcut\n", index->name); */ + /* ut_print_name(stderr, index->name); + fputs(" shortcut\n", stderr); */ srv_n_rows_read++; @@ -2923,8 +2922,8 @@ row_search_for_mysql( mtr_commit(&mtr); - /* printf("%s record not found 2\n", - index->name); */ + /* ut_print_name(stderr, index->name); + fputs(" record not found 2\n", stderr); */ if (trx->search_latch_timeout > 0 && trx->has_search_latch) { @@ -3044,8 +3043,9 @@ rec_loop: rec = btr_pcur_get_rec(pcur); /* - printf("Using index %s cnt %lu ", index->name, cnt); - printf("; Page no %lu\n", + fputs("Using ", stderr); + dict_index_name_print(stderr, index); + fprintf(stderr, " cnt %lu ; Page no %lu\n", cnt, buf_frame_get_page_no(buf_frame_align(rec))); rec_print(rec); */ @@ -3091,11 +3091,13 @@ rec_loop: ut_print_timestamp(stderr); fprintf(stderr, " InnoDB: Index corruption: rec offs %lu next offs %lu, page no %lu,\n" -"InnoDB: index %s, table %s. Run CHECK TABLE to table. You may need to\n" +"InnoDB: ", + (ulint)(rec - buf_frame_align(rec)), next_offs, + buf_frame_get_page_no(rec)); + dict_index_name_print(stderr, index); + fputs(". Run CHECK TABLE. You may need to\n" "InnoDB: restore from a backup, or dump + drop + reimport the table.\n", - (ulint)(rec - buf_frame_align(rec)), next_offs, - buf_frame_get_page_no(rec), index->name, - index->table_name); + stderr); err = DB_CORRUPTION; @@ -3106,10 +3108,12 @@ rec_loop: fprintf(stderr, "InnoDB: Index corruption: rec offs %lu next offs %lu, page no %lu,\n" -"InnoDB: index %s, table %s. We try to skip the rest of the page.\n", +"InnoDB: ", (ulint)(rec - buf_frame_align(rec)), next_offs, - buf_frame_get_page_no(rec), index->name, - index->table_name); + buf_frame_get_page_no(rec)); + dict_index_name_print(stderr, index); + fputs(". We try to skip the rest of the page.\n", + stderr); btr_pcur_move_to_last_on_page(pcur, &mtr); @@ -3121,11 +3125,13 @@ rec_loop: if (!rec_validate(rec) || !btr_index_rec_validate(rec, index, FALSE)) { fprintf(stderr, -"InnoDB: Index record corruption: rec offs %lu next offs %lu, page no %lu,\n" -"InnoDB: index %s, table %s. We try to skip the record.\n", +"InnoDB: Index corruption: rec offs %lu next offs %lu, page no %lu,\n" +"InnoDB: ", (ulint)(rec - buf_frame_align(rec)), next_offs, - buf_frame_get_page_no(rec), index->name, - index->table_name); + buf_frame_get_page_no(rec)); + dict_index_name_print(stderr, index); + fputs(". We try to skip the record.\n", + stderr); goto next_rec; } @@ -3142,7 +3148,7 @@ rec_loop: /* Test if the index record matches completely to search_tuple in prebuilt: if not, then we return with DB_RECORD_NOT_FOUND */ - /* printf("Comparing rec and search tuple\n"); */ + /* fputs("Comparing rec and search tuple\n", stderr); */ if (0 != cmp_dtuple_rec(search_tuple, rec)) { @@ -3162,7 +3168,8 @@ rec_loop: btr_pcur_store_position(pcur, &mtr); ret = DB_RECORD_NOT_FOUND; - /* printf("%s record not found 3\n", index->name); */ + /* ut_print_name(stderr, index->name); + fputs(" record not found 3\n", stderr); */ goto normal_return; } @@ -3187,7 +3194,8 @@ rec_loop: btr_pcur_store_position(pcur, &mtr); ret = DB_RECORD_NOT_FOUND; - /* printf("%s record not found 4\n", index->name); */ + /* ut_print_name(stderr, index->name); + fputs(" record not found 4\n", stderr); */ goto normal_return; } @@ -3453,8 +3461,9 @@ lock_wait_or_error: goto rec_loop; } - /* printf("Using index %s cnt %lu ret value %lu err\n", index->name, - cnt, err); */ +/* fputs("Using ", stderr); + dict_index_name_print(stderr, index); + fprintf(stderr, " cnt %lu ret value %lu err\n", cnt, err); */ trx->op_info = (char *) ""; return(err); @@ -3471,8 +3480,9 @@ normal_return: ret = DB_SUCCESS; } - /* printf("Using index %s cnt %lu ret value %lu\n", index->name, - cnt, err); */ +/* fputs("Using ", stderr); + dict_index_name_print(stderr, index); + fprintf(stderr, " cnt %lu ret value %lu err\n", cnt, err); */ if (ret == DB_SUCCESS) { srv_n_rows_read++; } diff --git a/innobase/row/row0umod.c b/innobase/row/row0umod.c index 5dde60029f0..5975bb164b9 100644 --- a/innobase/row/row0umod.c +++ b/innobase/row/row0umod.c @@ -417,13 +417,11 @@ row_undo_mod_del_unmark_sec_and_undo_update( { mem_heap_t* heap; btr_pcur_t pcur; - btr_cur_t* btr_cur; upd_t* update; ulint err = DB_SUCCESS; ibool found; big_rec_t* dummy_big_rec; mtr_t mtr; - char err_buf[1000]; log_free_check(); mtr_start(&mtr); @@ -431,23 +429,22 @@ row_undo_mod_del_unmark_sec_and_undo_update( found = row_search_index_entry(index, entry, mode, &pcur, &mtr); if (!found) { - fprintf(stderr, - "InnoDB: error in sec index entry del undo in\n" - "InnoDB: index %s table %s\n", index->name, - index->table->name); - dtuple_sprintf(err_buf, 900, entry); - fprintf(stderr, "InnoDB: tuple %s\n", err_buf); - - rec_sprintf(err_buf, 900, btr_pcur_get_rec(&pcur)); - fprintf(stderr, "InnoDB: record %s\n", err_buf); - - trx_print(err_buf, thr_get_trx(thr)); - fprintf(stderr, - "%s\nInnoDB: Make a detailed bug report and send it\n", - err_buf); - fprintf(stderr, "InnoDB: to mysql@lists.mysql.com\n"); + fputs("InnoDB: error in sec index entry del undo in\n" + "InnoDB: ", stderr); + dict_index_name_print(stderr, index); + fputs("\n" + "InnoDB: tuple ", stderr); + dtuple_print(stderr, entry); + fputs("\n" + "InnoDB: record ", stderr); + rec_print(stderr, btr_pcur_get_rec(&pcur)); + putc('\n', stderr); + trx_print(stderr, thr_get_trx(thr)); + fputs("\n" + "InnoDB: Make a detailed bug report and send it\n" + "InnoDB: to mysql@lists.mysql.com\n", stderr); } else { - btr_cur = btr_pcur_get_btr_cur(&pcur); + btr_cur_t* btr_cur = btr_pcur_get_btr_cur(&pcur); err = btr_cur_del_mark_set_sec_rec(BTR_NO_LOCKING_FLAG, btr_cur, FALSE, thr, &mtr); diff --git a/innobase/row/row0undo.c b/innobase/row/row0undo.c index a3ea42e1425..e1e44724752 100644 --- a/innobase/row/row0undo.c +++ b/innobase/row/row0undo.c @@ -169,8 +169,8 @@ row_undo_search_clust_to_pcur( is to make sure that some thread will eventually undo the modification corresponding to node->roll_ptr. */ - /* printf("--------------------undoing a previous version\n"); - */ + /* fputs("--------------------undoing a previous version\n", + stderr); */ ret = FALSE; } else { diff --git a/innobase/row/row0upd.c b/innobase/row/row0upd.c index ad6542845cb..02fe245ce8b 100644 --- a/innobase/row/row0upd.c +++ b/innobase/row/row0upd.c @@ -1202,7 +1202,6 @@ row_upd_sec_index_entry( rec_t* rec; ulint err = DB_SUCCESS; mtr_t mtr; - char err_buf[1000]; index = node->index; @@ -1223,21 +1222,22 @@ row_upd_sec_index_entry( rec = btr_cur_get_rec(btr_cur); if (!found) { - fprintf(stderr, "InnoDB: error in sec index entry update in\n" - "InnoDB: index %s table %s\n", index->name, - index->table->name); - dtuple_sprintf(err_buf, 900, entry); - fprintf(stderr, "InnoDB: tuple %s\n", err_buf); - - rec_sprintf(err_buf, 900, rec); - fprintf(stderr, "InnoDB: record %s\n", err_buf); - - trx_print(err_buf, thr_get_trx(thr)); - - fprintf(stderr, - "%s\nInnoDB: Make a detailed bug report and send it\n", - err_buf); - fprintf(stderr, "InnoDB: to mysql@lists.mysql.com\n"); + fputs("InnoDB: error in sec index entry update in\n" + "InnoDB: ", stderr); + dict_index_name_print(stderr, index); + fputs("\n" + "InnoDB: tuple ", stderr); + dtuple_print(stderr, entry); + fputs("\n" + "InnoDB: record ", stderr); + rec_print(stderr, rec); + putc('\n', stderr); + + trx_print(stderr, thr_get_trx(thr)); + + fputs("\n" + "InnoDB: Make a detailed bug report and send it\n" + "InnoDB: to mysql@lists.mysql.com\n", stderr); } else { /* Delete mark the old index record; it can already be delete marked if we return after a lock wait in |