diff options
author | unknown <monty@hundin.mysql.fi> | 2002-08-12 04:04:43 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-08-12 04:04:43 +0300 |
commit | 514e60480d77236aedb1ab69c0e7754e060e495a (patch) | |
tree | 4ba65b7347df0448111dd1a3ab055bc2c8a1c6dc /sql/ha_innodb.cc | |
parent | 9b1930152db6ecd30b8cbcc7200af2baf7f82295 (diff) | |
parent | 071994ba3665ce2284de5e77a4f06c0b6e93eeeb (diff) | |
download | mariadb-git-514e60480d77236aedb1ab69c0e7754e060e495a.tar.gz |
merge with 3.23.52
BitKeeper/deleted/.del-global.h~e80d28157acfdcb5:
Auto merged
Docs/manual.texi:
Auto merged
include/my_no_pthread.h:
Auto merged
innobase/include/univ.i:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/os/os0thread.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/ut/ut0ut.c:
Auto merged
mysql-test/r/bigint.result:
Auto merged
mysql-test/t/bigint.test:
Auto merged
mysys/my_init.c:
Auto merged
mysys/my_net.c:
Auto merged
mysys/mysys_priv.h:
Auto merged
mysys/thr_rwlock.c:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/sql_insert.cc:
Auto merged
include/my_sys.h:
merge with 3.23
libmysql/Makefile.shared:
merge with 3.23
mysql-test/mysql-test-run.sh:
merge with 3.23
mysql-test/r/func_if.result:
merge with 3.23
mysys/Makefile.am:
merge with 3.23
mysys/my_gethostbyname.c:
merge with 3.23
sql/ha_innodb.cc:
merge with 3.23
sql/item_cmpfunc.cc:
merge with 3.23
sql/mysqld.cc:
merge with 3.23
sql/sql_show.cc:
merge with 3.23
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 65 |
1 files changed, 62 insertions, 3 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 5d7d083ef91..bd03e9cffd3 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -19,7 +19,7 @@ /* TODO list for the InnoDB handler: - Ask Monty if strings of different languages can exist in the same - database. Answer: in near future yes, but not yet. + database. Answer: in 4.1 yes. */ #ifdef __GNUC__ @@ -308,6 +308,8 @@ innobase_mysql_print_thd( } buf[0]='\n'; buf[1]=0; + + ut_a(strlen(old_buf) < 400); } } @@ -393,6 +395,61 @@ ha_innobase::update_thd( return(0); } +/********************************************************************* +Call this when you have opened a new table handle in HANDLER, before you +call index_read_idx() etc. Actually, we can let the cursor stay open even +over a transaction commit! Then you should call this before every operation, +fecth next etc. This function inits the necessary things even after a +transaction commit. */ + +/* TODO: THIS CODE HAS NOT BEEN TESTED!!! */ + +void +ha_innobase::init_table_handle_for_HANDLER(void) +/*============================================*/ +{ + row_prebuilt_t* prebuilt; + + /* 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 + this operation is done in external_lock. */ + + update_thd(current_thd); + + /* Initialize the prebuilt struct much like it would be inited in + external_lock */ + + prebuilt = (row_prebuilt_t*)innobase_prebuilt; + + /* If the transaction is not started yet, start it */ + + trx_start_if_not_started_noninline(prebuilt->trx); + + /* Assign a read view if the transaction does not have it yet */ + + trx_assign_read_view(prebuilt->trx); + + /* We did the necessary inits in this function, no need to repeat them + in row_search_for_mysql */ + + prebuilt->sql_stat_start = FALSE; + + /* We let HANDLER always to do the reads as consistent reads, even + if the trx isolation level would have been specified as SERIALIZABLE */ + + prebuilt->select_lock_type = LOCK_NONE; + + /* Always fetch all columns in the index record */ + + prebuilt->hint_no_need_to_fetch_extra_cols = FALSE; + + /* We want always to fetch all columns in the whole row? Or do + we???? */ + + prebuilt->read_just_key = FALSE; +} + /************************************************************************* Opens an InnoDB database. */ @@ -3460,8 +3517,10 @@ innodb_show_status( DBUG_ENTER("innodb_show_status"); - /* We let the InnoDB Monitor to output at most 100 kB of text */ - buf = (char*)ut_malloc(100 * 1024); + /* We let the InnoDB Monitor to output at most 100 kB of text, add + a safety margin of 10 kB for buffer overruns */ + + buf = (char*)ut_malloc(110 * 1024); srv_sprintf_innodb_monitor(buf, 100 * 1024); |