Commit 80da2874 authored by marko's avatar marko

branches/zip: Always translate DB_TOO_BIG_RECORD into

my_error(ER_TOO_BIG_ROWSIZE, ...).  Otherwise, MySQL can report
"Got error 139 from storage engine" instead of the appropriate
error message.

ha_innobase::index_read(), ha_innobase::general_fetch():
Replace if-else if-else with switch-case.
Pass table->flags to convert_error_code_to_mysql().

innodb_check_for_record_too_big_error().  Remove.  This code belongs to
convert_error_code_to_mysql().

convert_error_code_to_mysql(): Add the parameter "flags", for table flags.
Translate DB_TOO_BIG_RECORD into ER_TOO_BIG_ROWSIZE.

create_index(): Add the parameter "flags".

create_clustered_index_when_no_primary(): Replace the parameter "comp"
with "flags".

innobase_drop_database(): Remove the #ifdef'd-out call to 
convert_error_code_to_mysql().
parent 4b936f67
This diff is collapsed.
...@@ -263,4 +263,5 @@ convert_error_code_to_mysql( ...@@ -263,4 +263,5 @@ convert_error_code_to_mysql(
/*========================*/ /*========================*/
/* out: MySQL error code */ /* out: MySQL error code */
int error, /* in: InnoDB error code */ int error, /* in: InnoDB error code */
ulint flags, /* in: InnoDB table flags, or 0 */
MYSQL_THD thd); /* in: user thread handle or NULL */ MYSQL_THD thd); /* in: user thread handle or NULL */
...@@ -720,7 +720,8 @@ err_exit: ...@@ -720,7 +720,8 @@ err_exit:
break; break;
default: default:
error = convert_error_code_to_mysql( error = convert_error_code_to_mysql(
trx->error_state, user_thd); trx->error_state, innodb_table->flags,
user_thd);
} }
row_mysql_unlock_data_dictionary(trx); row_mysql_unlock_data_dictionary(trx);
...@@ -872,7 +873,9 @@ error: ...@@ -872,7 +873,9 @@ error:
} }
convert_error: convert_error:
error = convert_error_code_to_mysql(error, user_thd); error = convert_error_code_to_mysql(error,
innodb_table->flags,
user_thd);
} }
mem_heap_free(heap); mem_heap_free(heap);
...@@ -1095,7 +1098,7 @@ ha_innobase::final_drop_index( ...@@ -1095,7 +1098,7 @@ ha_innobase::final_drop_index(
transaction depends on an index that is being dropped. */ transaction depends on an index that is being dropped. */
err = convert_error_code_to_mysql( err = convert_error_code_to_mysql(
row_merge_lock_table(prebuilt->trx, prebuilt->table, LOCK_X), row_merge_lock_table(prebuilt->trx, prebuilt->table, LOCK_X),
user_thd); prebuilt->table->flags, user_thd);
if (UNIV_UNLIKELY(err)) { if (UNIV_UNLIKELY(err)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment