1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

new SELECT_LEX structure

This commit is contained in:
bell@sanja.is.com.ua
2002-05-07 00:04:16 +03:00
parent 06ed215c37
commit 494184ff5f
11 changed files with 372 additions and 111 deletions

View File

@ -706,19 +706,28 @@ 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), sel((SELECT_LEX *)0)
SELECT_LEX_UNIT *sel;
inline Table_ident(LEX_STRING db_arg, LEX_STRING table_arg, bool force)
:table(table_arg), sel((SELECT_LEX_UNIT *)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), 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 Table_ident(LEX_STRING table_arg)
:table(table_arg), sel((SELECT_LEX_UNIT *)0)
{
db.str=0;
}
inline Table_ident(SELECT_LEX_UNIT *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); }
{
db.str= db_name; db.length= (uint) strlen(db_name);
}
};
// this is needed for user_vars hash