summaryrefslogtreecommitdiff
path: root/sql/ha_berkeley.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-01-06 01:48:59 +0200
committermonty@mashka.mysql.fi <>2003-01-06 01:48:59 +0200
commit1f6ecc0cd3d9acf4751ebbbf8db8b6ee468d3abf (patch)
tree5fe133480d7e74a88990405ae324694fb8797fa5 /sql/ha_berkeley.cc
parentf9772317eefe95fe8152d69593082b2864164e16 (diff)
downloadmariadb-git-1f6ecc0cd3d9acf4751ebbbf8db8b6ee468d3abf.tar.gz
Changed mysql-test to print warnings for not existing table to DROP TABLE
Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names. changed store_warning() -> push_warning_print()
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r--sql/ha_berkeley.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
index adc2e0db195..5d57e9cdf9b 100644
--- a/sql/ha_berkeley.cc
+++ b/sql/ha_berkeley.cc
@@ -512,7 +512,8 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
file->app_private= (void*) (table->key_info+table->primary_key);
if ((error= txn_begin(db_env, 0, (DB_TXN**) &transaction, 0)) ||
(error= (file->open(file, transaction,
- fn_format(name_buff, name, "", ha_berkeley_ext, 2 | 4),
+ fn_format(name_buff, name, "", ha_berkeley_ext,
+ 2 | 4),
"main", DB_BTREE, open_mode, 0))) ||
(error= transaction->commit(transaction, 0)))
{
@@ -1950,10 +1951,13 @@ int ha_berkeley::rename_table(const char * from, const char * to)
if ((error= db_create(&file, db_env, 0)))
my_errno= error;
else
+ {
+ /* On should not do a file->close() after rename returns */
error= file->rename(file,
fn_format(from_buff, from, "", ha_berkeley_ext, 2 | 4),
NULL, fn_format(to_buff, to, "", ha_berkeley_ext,
2 | 4), 0);
+ }
return error;
}