mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
[t:2151], more changes as result of code review
git-svn-id: file:///svn/mysql/tokudb-engine/src@16278 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
b7501f62ef
commit
8516fa4e3b
2 changed files with 4 additions and 10 deletions
|
@ -3202,10 +3202,7 @@ int ha_tokudb::remove_key(DB_TXN * trans, uint keynr, const uchar * record, DBT
|
|||
DBUG_PRINT("primary", ("index: %d", primary_key));
|
||||
DBUG_DUMP("prim_key", (uchar *) prim_key->data, prim_key->size);
|
||||
|
||||
if (keynr == active_index && cursor) {
|
||||
error = cursor->c_del(cursor, 0);
|
||||
}
|
||||
else if (keynr == primary_key) { // Unique key
|
||||
if (keynr == primary_key) { // Unique key
|
||||
DBUG_PRINT("Primary key", ("index: %d", keynr));
|
||||
error = share->key_file[keynr]->del(share->key_file[keynr], trans, prim_key , DB_DELETE_ANY);
|
||||
}
|
||||
|
|
|
@ -293,17 +293,13 @@ static int tokudb_init_func(void *p) {
|
|||
}
|
||||
|
||||
|
||||
r= metadata_db->open(metadata_db, 0, TOKU_METADB_NAME, NULL, DB_BTREE, DB_THREAD, 0);
|
||||
r= metadata_db->open(metadata_db, NULL, TOKU_METADB_NAME, NULL, DB_BTREE, DB_THREAD, 0);
|
||||
if (r) {
|
||||
if (r != ENOENT) {
|
||||
sql_print_error("Got error %d when trying to open metadata_db", r);
|
||||
goto error;
|
||||
}
|
||||
sql_print_warning("No metadata table exists, so creating it");
|
||||
r= metadata_db->open(metadata_db, NULL, TOKU_METADB_NAME, NULL, DB_BTREE, DB_THREAD | DB_CREATE | DB_EXCL, my_umask);
|
||||
if (r) {
|
||||
goto error;
|
||||
}
|
||||
r = metadata_db->close(metadata_db,0);
|
||||
assert(r == 0);
|
||||
r = db_create(&metadata_db, db_env, 0);
|
||||
|
@ -311,7 +307,8 @@ static int tokudb_init_func(void *p) {
|
|||
DBUG_PRINT("info", ("failed to create metadata db %d\n", r));
|
||||
goto error;
|
||||
}
|
||||
r= metadata_db->open(metadata_db, 0, TOKU_METADB_NAME, NULL, DB_BTREE, DB_THREAD, 0);
|
||||
|
||||
r= metadata_db->open(metadata_db, NULL, TOKU_METADB_NAME, NULL, DB_BTREE, DB_THREAD | DB_CREATE | DB_EXCL, my_umask);
|
||||
if (r) {
|
||||
goto error;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue