Commit 60bda4b6 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1654

merge change for this bug into main

git-svn-id: file:///svn/mysql/tokudb-engine/src@11188 c7de825b-a66e-492c-adef-691d508d4ae1
parent e7f33e88
...@@ -3837,7 +3837,21 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in ...@@ -3837,7 +3837,21 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in
if (!(error = (db_create(&status_block, db_env, 0)))) { if (!(error = (db_create(&status_block, db_env, 0)))) {
make_name(newname, name, "status"); make_name(newname, name, "status");
fn_format(name_buff, newname, "", 0, MY_UNPACK_FILENAME); fn_format(name_buff, newname, "", 0, MY_UNPACK_FILENAME);
//
// create a row descriptor that is the same as a hidden primary key
//
row_descriptor.size = create_toku_key_descriptor(
row_desc_buff,
true,
false,
NULL,
false,
NULL
);
error = status_block->set_descriptor(status_block, &row_descriptor);
if (error) {
goto cleanup;
}
if (!(error = (status_block->open(status_block, NULL, name_buff, NULL, DB_BTREE, DB_CREATE, 0)))) { if (!(error = (status_block->open(status_block, NULL, name_buff, NULL, DB_BTREE, DB_CREATE, 0)))) {
uint version = HA_TOKU_VERSION; uint version = HA_TOKU_VERSION;
uint capabilities = HA_TOKU_CAP; uint capabilities = HA_TOKU_CAP;
......
...@@ -59,12 +59,12 @@ typedef struct st_tokudb_share { ...@@ -59,12 +59,12 @@ typedef struct st_tokudb_share {
// To get the version, one looks up the value associated with key hatoku_version // To get the version, one looks up the value associated with key hatoku_version
// in status.tokudb // in status.tokudb
// //
typedef enum {
hatoku_version = 0, typedef ulonglong HA_METADATA_KEY;
hatoku_capabilities, #define hatoku_version 0
hatoku_max_ai, //maximum auto increment value found so far #define hatoku_capabilities 1
hatoku_ai_create_value #define hatoku_max_ai 2 //maximum auto increment value found so far
} HA_METADATA_KEY ; #define hatoku_ai_create_value 3
typedef struct st_prim_key_part_info { typedef struct st_prim_key_part_info {
uint offset; uint offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment