diff options
Diffstat (limited to 'innobase/row/row0mysql.c')
-rw-r--r-- | innobase/row/row0mysql.c | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index 13c0332dcef..59e2c08dfda 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -571,6 +571,8 @@ row_insert_for_mysql( trx->op_info = "inserting"; + trx_start_if_not_started(trx); + if (node == NULL) { row_get_prebuilt_insert_row(prebuilt); node = prebuilt->ins_node; @@ -754,6 +756,8 @@ row_update_for_mysql( trx->op_info = "updating or deleting"; + trx_start_if_not_started(trx); + node = prebuilt->upd_node; clust_index = dict_table_get_first_index(table); @@ -947,6 +951,8 @@ row_create_table_for_mysql( trx->op_info = "creating table"; + trx_start_if_not_started(trx); + namelen = ut_strlen(table->name); keywordlen = ut_strlen("innodb_monitor"); @@ -1077,6 +1083,8 @@ row_create_index_for_mysql( trx->op_info = "creating index"; + trx_start_if_not_started(trx); + /* Serialize data dictionary operations with dictionary mutex: no deadlocks can occur then in these operations */ @@ -1146,6 +1154,8 @@ row_table_add_foreign_constraints( trx->op_info = "adding foreign keys"; + trx_start_if_not_started(trx); + /* Serialize data dictionary operations with dictionary mutex: no deadlocks can occur then in these operations */ @@ -1218,6 +1228,8 @@ row_drop_table_for_mysql( trx->op_info = "dropping table"; + trx_start_if_not_started(trx); + namelen = ut_strlen(name); keywordlen = ut_strlen("innodb_monitor"); @@ -1435,6 +1447,8 @@ row_drop_database_for_mysql( trx->op_info = "dropping database"; + trx_start_if_not_started(trx); + mutex_enter(&(dict_sys->mutex)); while (table_name = dict_get_first_table_name_in_db(name)) { @@ -1496,6 +1510,7 @@ row_rename_table_for_mysql( } trx->op_info = "renaming table"; + trx_start_if_not_started(trx); str1 = "PROCEDURE RENAME_TABLE_PROC () IS\n" @@ -1602,6 +1617,7 @@ row_scan_and_check_index( rec_t* rec; ibool is_ok = TRUE; int cmp; + char err_buf[1000]; *n_rows = 0; @@ -1649,15 +1665,27 @@ loop: if (cmp > 0) { fprintf(stderr, "Error: index records in a wrong order in index %s\n", - index->name); + 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; } else if ((index->type & DICT_UNIQUE) && matched_fields >= dict_index_get_n_ordering_defined_by_user(index)) { - fprintf(stderr, - "Error: duplicate key in index %s\n", - index->name); + + 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; } |