diff options
author | unknown <monty@donna.mysql.fi> | 2001-03-03 03:03:12 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-03-03 03:03:12 +0200 |
commit | 73e3499987b138af0bd6ab7df2c69999e2ffbeec (patch) | |
tree | cd2f65141c35a1998982970704a3f854a987c568 /sql/ha_berkeley.cc | |
parent | 3ab1788501f7d967a0260e78230674aaa67ec16e (diff) | |
download | mariadb-git-73e3499987b138af0bd6ab7df2c69999e2ffbeec.tar.gz |
Fixes for innobase usage
Fixed bug when using TEXT columns with BDB tables
Allow LOAD DATA INFILE to use numbers with ENUM and SET columns
BUILD/compile-pentium:
Added --with-innobase-db
Docs/manual.texi:
Added more documentation to Innobase and KILL
client/mysqladmin.c:
Quote database names for CREATE and DROP
mysql-test/install_test_db.sh:
Don't use innobase, bdb or gemini when installing privilege tables
mysql-test/mysql-test-run.sh:
Added testing of innobase tables
mysql-test/r/bdb.result:
Added test of TEXT column bug
mysql-test/t/bdb.test:
Added test of TEXT column bug
mysql-test/t/innobase.test:
Cleanup innobase tests
scripts/mysql_install_db.sh:
Added testing of innobase tables
sql/field.cc:
Allow LOAD DATA INFILE to use numbers with ENUM and SET columns
sql/filesort.cc:
Fixed typo
sql/ha_berkeley.cc:
Fixed problem with TEXT columns in BDB tables
sql/mysqld.cc:
Always support the --innobase-data-file-path option
sql/share/swedish/errmsg.OLD:
Added swedish error messages
sql/share/swedish/errmsg.txt:
Added swedish error messages
sql/sql_base.cc:
Reset tables after usage (to fix problem with BDB and TEXT columns)
sql/sql_delete.cc:
Use generate table if --skip-innobase is used
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r-- | sql/ha_berkeley.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 9a6df95193a..ea9f492a9c8 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -21,7 +21,7 @@ - Don't automaticly pack all string keys (To do this we need to modify CREATE TABLE so that one can use the pack_keys argument per key). - An argument to pack_key that we don't want compression. - - DB_DBT_USERMEN should be used for fixed length tables + - DB_DBT_USERMEM should be used for fixed length tables We will need an updated Berkeley DB version for this. - Killing threads that has got a 'deadlock' - SHOW TABLE STATUS should give more information about the table. @@ -585,6 +585,7 @@ int ha_berkeley::close(void) my_free(rec_buff,MYF(MY_ALLOW_ZERO_PTR)); my_free(alloc_ptr,MYF(MY_ALLOW_ZERO_PTR)); + ha_berkeley::extra(HA_EXTRA_RESET); // current_row buffer DBUG_RETURN(free_share(share,table, hidden_primary_key,0)); } @@ -1587,6 +1588,15 @@ int ha_berkeley::extra(enum ha_extra_function operation) case HA_EXTRA_RESET_STATE: key_read=0; using_ignore=0; + if (current_row.flags & (DB_DBT_MALLOC | DB_DBT_REALLOC)) + { + current_row.flags=0; + if (current_row.data) + { + free(current_row.data); + current_row.data=0; + } + } break; case HA_EXTRA_KEYREAD: key_read=1; // Query satisfied with key @@ -1662,17 +1672,7 @@ int ha_berkeley::external_lock(THD *thd, int lock_type) else { lock.type=TL_UNLOCK; // Unlocked - if (current_row.flags & (DB_DBT_MALLOC | DB_DBT_REALLOC)) - { - current_row.flags=0; - if (current_row.data) - { - free(current_row.data); - current_row.data=0; - } - } thread_safe_add(share->rows, changed_rows, &share->mutex); - current_row.data=0; if (!--thd->transaction.bdb_lock_count) { if (thd->transaction.stmt.bdb_tid) |