Commit 49b0a37b authored by osku's avatar osku

Use que_eval_sql() in dict_create_or_check_foreign_constraint_tables.

parent 177a588b
...@@ -1127,11 +1127,8 @@ dict_create_or_check_foreign_constraint_tables(void) ...@@ -1127,11 +1127,8 @@ dict_create_or_check_foreign_constraint_tables(void)
{ {
dict_table_t* table1; dict_table_t* table1;
dict_table_t* table2; dict_table_t* table2;
que_thr_t* thr;
que_t* graph;
ulint error; ulint error;
trx_t* trx; trx_t* trx;
const char* str;
mutex_enter(&(dict_sys->mutex)); mutex_enter(&(dict_sys->mutex));
...@@ -1183,7 +1180,7 @@ dict_create_or_check_foreign_constraint_tables(void) ...@@ -1183,7 +1180,7 @@ dict_create_or_check_foreign_constraint_tables(void)
VARBINARY, like in other InnoDB system tables, to get a clean VARBINARY, like in other InnoDB system tables, to get a clean
design. */ design. */
str = error = que_eval_sql(NULL,
"PROCEDURE CREATE_FOREIGN_SYS_TABLES_PROC () IS\n" "PROCEDURE CREATE_FOREIGN_SYS_TABLES_PROC () IS\n"
"BEGIN\n" "BEGIN\n"
"CREATE TABLE\n" "CREATE TABLE\n"
...@@ -1195,22 +1192,8 @@ dict_create_or_check_foreign_constraint_tables(void) ...@@ -1195,22 +1192,8 @@ dict_create_or_check_foreign_constraint_tables(void)
"SYS_FOREIGN_COLS(ID CHAR, POS INT, FOR_COL_NAME CHAR, REF_COL_NAME CHAR);\n" "SYS_FOREIGN_COLS(ID CHAR, POS INT, FOR_COL_NAME CHAR, REF_COL_NAME CHAR);\n"
"CREATE UNIQUE CLUSTERED INDEX ID_IND ON SYS_FOREIGN_COLS (ID, POS);\n" "CREATE UNIQUE CLUSTERED INDEX ID_IND ON SYS_FOREIGN_COLS (ID, POS);\n"
"COMMIT WORK;\n" "COMMIT WORK;\n"
"END;\n"; "END;\n"
, trx);
graph = pars_sql(NULL, str);
ut_a(graph);
graph->trx = trx;
trx->graph = NULL;
graph->fork_type = QUE_FORK_MYSQL_INTERFACE;
ut_a(thr = que_fork_start_command(graph));
que_run_threads(thr);
error = trx->error_state;
if (error != DB_SUCCESS) { if (error != DB_SUCCESS) {
fprintf(stderr, "InnoDB: error %lu in creation\n", fprintf(stderr, "InnoDB: error %lu in creation\n",
...@@ -1229,8 +1212,6 @@ dict_create_or_check_foreign_constraint_tables(void) ...@@ -1229,8 +1212,6 @@ dict_create_or_check_foreign_constraint_tables(void)
error = DB_MUST_GET_MORE_FILE_SPACE; error = DB_MUST_GET_MORE_FILE_SPACE;
} }
que_graph_free(graph);
trx->op_info = ""; trx->op_info = "";
row_mysql_unlock_data_dictionary(trx); row_mysql_unlock_data_dictionary(trx);
......
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