diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-04-09 23:14:45 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-04-09 23:14:45 +0200 |
commit | 6be6b4ab762bedbe08896252fe4a97d2aee2b0f9 (patch) | |
tree | e6bbf05e564d041277d6d2c8ba5c8d5d46646716 /storage/connect/ha_connect.h | |
parent | b3b02104675e68e5a016cbbb2a6620585424672c (diff) | |
download | mariadb-git-6be6b4ab762bedbe08896252fe4a97d2aee2b0f9.tar.gz |
- All the processing of creating, dropping, modifying indexes was redesigned.
The code was a legacy from the first versions of the XDB engine dating 2004
and was not working anymore with recent versions of MySQL/MariaDB. A patch
in create had been added but is was unsatisfying, recreating all indexes on
any alter statement and sometimes doing nothing when it should have.
This is a major update to be tested for stability. It was in most important
cases et all current tests pass with this new version
modified:
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/mycat.cc
storage/connect/plugutil.c
storage/connect/tabdos.cpp
storage/connect/user_connect.cc
storage/connect/user_connect.h
storage/connect/xindex.h
Diffstat (limited to 'storage/connect/ha_connect.h')
-rw-r--r-- | storage/connect/ha_connect.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index e31564aa94d..147e326c632 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -31,23 +31,33 @@ /****************************************************************************/ typedef struct _create_xinfo { char *Type; /* Retrieved from table comment */ - char *Filename; /* Set if not standard */ + char *Filename; /* Set if not standard */ char *IndexFN; /* Set if not standard */ ulonglong Maxrows; /* Estimated max nb of rows */ ulong Lrecl; /* Set if not default */ - ulong Elements; /* Number of lines in blocks */ + ulong Elements; /* Number of lines in blocks */ bool Fixed; /* False for DOS type */ void *Pcf; /* To list of columns */ void *Pxdf; /* To list of indexes */ } CRXINFO, *PCXF; typedef struct _xinfo { - ulonglong data_file_length; /* Length of data file */ + ulonglong data_file_length; /* Length of data file */ ha_rows records; /* Records in table */ ulong mean_rec_length; /* Physical record length */ - char *data_file_name; /* Physical file name */ + char *data_file_name; /* Physical file name */ } XINFO, *PXF; +class XCHK : public BLOCK { +public: + XCHK(void) {oldsep= newsep= false; oldpix= newpix= NULL;} + bool oldsep; // Sepindex before create/alter + bool newsep; // Sepindex after create/alter + PIXDEF oldpix; // The indexes before create/alter + PIXDEF newpix; // The indexes after create/alter +}; // end of class XCHK + +typedef class XCHK *PCHK; typedef class user_connect *PCONNECT; typedef struct ha_table_option_struct TOS, *PTOS; typedef struct ha_field_option_struct FOS, *PFOS; @@ -87,11 +97,12 @@ public: char *GetStringOption(char *opname, char *sdef= NULL); PTOS GetTableOptionStruct(TABLE *table_arg); bool GetBooleanOption(char *opname, bool bdef); + bool SetBooleanOption(char *opname, bool b); int GetIntegerOption(char *opname); bool SetIntegerOption(char *opname, int n); PFOS GetFieldOptionStruct(Field *fp); void *GetColumnOption(void *field, PCOLINFO pcf); - PIXDEF GetIndexInfo(int n); + PIXDEF GetIndexInfo(void); const char *GetDBName(const char *name); const char *GetTableName(void); int GetColNameLen(Field *fp); |