diff options
author | unknown <monty@donna.mysql.fi> | 2001-03-06 20:39:10 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-03-06 20:39:10 +0200 |
commit | 6068405ca64ea9ee5fef22d2133cc374639a1407 (patch) | |
tree | ba2f7b904fc9d9c6bee64d91dbd4af3a0425e2b4 /sql/ha_innobase.cc | |
parent | 08d7d5cf331a9f0e860792c356201ef386ceea5d (diff) | |
parent | e58c19253841961fa558625746a8a0e780427f0d (diff) | |
download | mariadb-git-6068405ca64ea9ee5fef22d2133cc374639a1407.tar.gz |
Merge work:/my/mysql into donna.mysql.fi:/home/my/bk/mysql
sql/ha_innobase.cc:
Auto merged
Diffstat (limited to 'sql/ha_innobase.cc')
-rw-r--r-- | sql/ha_innobase.cc | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index b1008737ca4..06b154252de 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -18,12 +18,6 @@ Innobase */ /* TODO list for the Innobase handler: - - How to check for deadlocks if Innobase tables are used alongside - other MySQL table types? Solution: we will use a timeout. - - Innobase currently includes the path to a table name: the path should - actually be dropped off, because we may move a whole database to a new - directory. - - Add a deadlock error message to MySQL. - Ask Monty if strings of different languages can exist in the same database. Answer: in near future yes, but not yet. */ @@ -415,10 +409,10 @@ innobase_init(void) /*===============*/ /* out: TRUE if error */ { - int err; - bool ret; - ibool test_bool; - static char current_dir[3]; + static char current_dir[3]; + int err; + bool ret; + DBUG_ENTER("innobase_init"); /* Use current_dir if no paths are set */ @@ -1660,7 +1654,7 @@ ha_innobase::change_active_index( statistic_increment(ha_read_key_count, &LOCK_status); - DBUG_ENTER("ha_innobase::change_active_index"); + DBUG_ENTER("index_read_idx"); active_index = keynr; @@ -1686,7 +1680,7 @@ ha_innobase::change_active_index( build_template(prebuilt, user_thd, table, ROW_MYSQL_WHOLE_ROW); - DBUG_RETURN(0); + return(0); } /************************************************************************** @@ -2220,7 +2214,6 @@ ha_innobase::create( { int error; dict_table_t* innobase_table; - uint name_len; trx_t* trx; int primary_key_no = -1; KEY* key; @@ -2238,7 +2231,7 @@ ha_innobase::create( /* Create the table definition in Innobase */ - if ((error = create_table_def(trx, form, norm_name))) { + if (error = create_table_def(trx, form, norm_name)) { trx_commit_for_mysql(trx); @@ -2257,6 +2250,11 @@ ha_innobase::create( } } + /* Our function row_get_mysql_key_number_for_index assumes + the primary key is always number 0, if it exists */ + + assert(primary_key_no == -1 || primary_key_no == 0); + /* Create the keys */ if (form->keys == 0 || primary_key_no == -1) { @@ -2570,9 +2568,9 @@ ha_innobase::info( } if (flag & HA_STATUS_ERRKEY) { - - errkey = (unsigned int)-1; /* TODO: get the key number from - Innobase */ + errkey = (unsigned int) row_get_mysql_key_number_for_index( + (dict_index_t*) + prebuilt->trx->error_info); } DBUG_VOID_RETURN; |