mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Fix for new berkeley DB interface
This commit is contained in:
parent
a67ff1bf08
commit
6633c2113a
2 changed files with 6 additions and 4 deletions
|
@ -38173,6 +38173,8 @@ though, so 3.23 is not released as a stable version yet.
|
|||
Fixed bug where the automatic repair of MyISAM tables failed sometimes
|
||||
when the data file was corrupt.
|
||||
@item
|
||||
Fixed a bug in @code{SHOW CREATE} when using auto_increment columns.
|
||||
@item
|
||||
Changed BDB tables to use new compare function in Berkeley DB 3.2.3
|
||||
@item
|
||||
You can now use Unix sockets with @code{mit-pthreads}
|
||||
|
|
|
@ -213,7 +213,7 @@ berkeley_cmp_hidden_key(DB* file, const DBT *new_key, const DBT *saved_key)
|
|||
static int
|
||||
berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key)
|
||||
{
|
||||
KEY *key= (KEY*) BT_APP_PRIVATE(file);
|
||||
KEY *key= (KEY*) (file->app_private);
|
||||
char *new_key_ptr= (char*) new_key->data;
|
||||
char *saved_key_ptr=(char*) saved_key->data;
|
||||
KEY_PART_INFO *key_part= key->key_part, *end=key_part+key->key_parts;
|
||||
|
@ -244,7 +244,7 @@ berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key)
|
|||
static int
|
||||
berkeley_cmp_fix_length_key(DB *file, const DBT *new_key, const DBT *saved_key)
|
||||
{
|
||||
KEY *key=(KEY*) BT_APP_PRIVATE(file);
|
||||
KEY *key=(KEY*) (file->app_private);
|
||||
char *new_key_ptr= (char*) new_key->data;
|
||||
char *saved_key_ptr=(char*) saved_key->data;
|
||||
KEY_PART_INFO *key_part= key->key_part, *end=key_part+key->key_parts;
|
||||
|
@ -322,7 +322,7 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
|
|||
(hidden_primary_key ? berkeley_cmp_hidden_key :
|
||||
berkeley_cmp_packed_key));
|
||||
if (!hidden_primary_key)
|
||||
file->set_bt_app_private(file,table->key_info+table->primary_key);
|
||||
file->app_private= (void*) (table->key_info+table->primary_key);
|
||||
if ((error=(file->open(file, fn_format(name_buff,name,"", ha_berkeley_ext,
|
||||
2 | 4),
|
||||
"main", DB_BTREE, open_mode,0))))
|
||||
|
@ -361,7 +361,7 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
|
|||
sprintf(part,"key%02d",++used_keys);
|
||||
key_type[i]=table->key_info[i].flags & HA_NOSAME ? DB_NOOVERWRITE : 0;
|
||||
(*ptr)->set_bt_compare(*ptr, berkeley_cmp_packed_key);
|
||||
(*ptr)->set_bt_app_private(*ptr,table->key_info+i);
|
||||
(*ptr)->app_private= (void*) (table->key_info+i);
|
||||
if (!(table->key_info[i].flags & HA_NOSAME))
|
||||
(*ptr)->set_flags(*ptr, DB_DUP);
|
||||
if ((error=((*ptr)->open(*ptr, name_buff, part, DB_BTREE,
|
||||
|
|
Loading…
Reference in a new issue