1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00
This commit is contained in:
monty@hundin.mysql.fi
2002-04-13 15:34:39 +03:00
174 changed files with 54887 additions and 1440 deletions

View File

@ -215,14 +215,16 @@ public:
class Key :public Sql_alloc {
public:
enum Keytype { PRIMARY, UNIQUE, MULTIPLE, FULLTEXT };
enum Keytype { PRIMARY, UNIQUE, MULTIPLE, FULLTEXT, SPATIAL };
enum Keytype type;
enum ha_key_alg algorithm;
List<key_part_spec> columns;
const char *Name;
Key(enum Keytype type_par,const char *name_arg,List<key_part_spec> &cols)
:type(type_par), algorithm(HA_KEY_ALG_UNDEF), columns(cols), Name(name_arg)
Key(enum Keytype type_par, enum ha_key_alg alg_par, const char *name_arg, List<key_part_spec> &cols)
:type(type_par), algorithm(alg_par), columns(cols), Name(name_arg)
{}
~Key() {}
const char *name() { return Name; }
@ -703,15 +705,17 @@ class Table_ident :public Sql_alloc {
public:
LEX_STRING db;
LEX_STRING table;
SELECT_LEX *sel;
inline Table_ident(LEX_STRING db_arg,LEX_STRING table_arg,bool force)
:table(table_arg)
:table(table_arg), sel((SELECT_LEX *)0)
{
if (!force && (current_thd->client_capabilities & CLIENT_NO_SCHEMA))
db.str=0;
else
db= db_arg;
}
inline Table_ident(LEX_STRING table_arg) :table(table_arg) {db.str=0;}
inline Table_ident(LEX_STRING table_arg) :table(table_arg), sel((SELECT_LEX *)0) {db.str=0;}
inline Table_ident(SELECT_LEX *s) : sel(s) {db.str=0; table.str=(char *)""; table.length=0;}
inline void change_db(char *db_name)
{ db.str= db_name; db.length=(uint) strlen(db_name); }
};