diff options
author | unknown <monty@hundin.mysql.fi> | 2002-08-22 00:20:57 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-08-22 00:20:57 +0300 |
commit | 2466b5b9b3d937fce0d0f8313b7b1e77fa900c86 (patch) | |
tree | 2c831d32a2a3edb8cb18c9ddac35f69a20fa87b2 /sql | |
parent | 656da11b9163261ab661f1c22c16758e7b5482a6 (diff) | |
parent | c9a2caa7f062a22a567d5d763c8f046688191686 (diff) | |
download | mariadb-git-2466b5b9b3d937fce0d0f8313b7b1e77fa900c86.tar.gz |
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innodb.cc | 5 | ||||
-rw-r--r-- | sql/ha_innodb.h | 5 | ||||
-rw-r--r-- | sql/handler.h | 2 | ||||
-rw-r--r-- | sql/sql_handler.cc | 3 |
4 files changed, 6 insertions, 9 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index ae787789a81..b6b86a1988a 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -404,7 +404,6 @@ ha_innobase::update_thd( return(0); } -#ifdef notdefined /* The code here appears for documentational purposes only. Not used or tested yet. Will be used in 4.1. */ /********************************************************************* @@ -420,9 +419,6 @@ ha_innobase::init_table_handle_for_HANDLER(void) { row_prebuilt_t* prebuilt; - ut_a(0); /* the code has not been used or tested yet; to prevent - inadvertent usage we assert an error here */ - /* If current thd does not yet have a trx struct, create one. If the current handle does not yet have a prebuilt struct, create one. Update the trx pointers in the prebuilt struct. Normally @@ -462,7 +458,6 @@ ha_innobase::init_table_handle_for_HANDLER(void) prebuilt->read_just_key = FALSE; } -#endif /************************************************************************* Opens an InnoDB database. */ diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h index 6df24140df5..2addd957c8c 100644 --- a/sql/ha_innodb.h +++ b/sql/ha_innodb.h @@ -76,7 +76,7 @@ class ha_innobase: public handler ha_innobase(TABLE *table): handler(table), int_table_flags(HA_REC_NOT_IN_SEQ | HA_KEYPOS_TO_RNDPOS | HA_LASTKEY_ORDER | - HA_NULL_KEY | + HA_NULL_KEY | HA_CAN_SQL_HANDLER | HA_NOT_EXACT_COUNT | HA_NO_WRITE_DELAYED | HA_PRIMARY_KEY_IN_READ_INDEX | @@ -164,8 +164,7 @@ class ha_innobase: public handler void free_foreign_key_create_info(char* str); THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); - /* void init_table_handle_for_HANDLER(); Not tested or used yet, code - included for documentational purposes only */ + void init_table_handle_for_HANDLER(); longlong get_auto_increment(); }; diff --git a/sql/handler.h b/sql/handler.h index fcc6bc261e7..4e854aa00a6 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -313,6 +313,8 @@ public: virtual void append_create_info(String *packet) {} virtual char* get_foreign_key_create_info() { return(NULL);} /* gets foreign key create string from InnoDB */ + virtual void init_table_handle_for_HANDLER() + { return; } /* prepare InnoDB for HANDLER */ virtual void free_foreign_key_create_info(char* str) {} /* The following can be called without an open handler */ virtual const char *table_type() const =0; diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 27d5d431750..046ab87d18b 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -117,6 +117,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables, keyname,tables->name); return -1; } + table->file->index_init(keyno); } List<Item> list; @@ -127,7 +128,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables, insert_fields(thd,tables,tables->db,tables->name,&it); - table->file->index_init(keyno); + table->file->init_table_handle_for_HANDLER(); // Only InnoDB requires it select_limit+=offset_limit; send_fields(thd,list,1); |