159
159
MY_LOCALE *my_locale_by_name(const char *name);
160
160
MY_LOCALE *my_locale_by_number(uint number);
162
/*************************************************************************/
165
Object_creation_ctx -- interface for creation context of database objects
166
(views, stored routines, events, triggers). Creation context -- is a set
167
of attributes, that should be fixed at the creation time and then be used
168
each time the object is parsed or executed.
171
class Object_creation_ctx
174
Object_creation_ctx *set_n_backup(THD *thd);
176
void restore_env(THD *thd, Object_creation_ctx *backup_ctx);
179
Object_creation_ctx() {}
180
virtual Object_creation_ctx *create_backup_ctx(THD *thd) const = 0;
182
virtual void change_env(THD *thd) const = 0;
185
virtual ~Object_creation_ctx()
189
/*************************************************************************/
192
Default_object_creation_ctx -- default implementation of
196
class Default_object_creation_ctx : public Object_creation_ctx
199
CHARSET_INFO *get_client_cs()
204
CHARSET_INFO *get_connection_cl()
206
return m_connection_cl;
210
Default_object_creation_ctx(THD *thd);
212
Default_object_creation_ctx(CHARSET_INFO *client_cs,
213
CHARSET_INFO *connection_cl);
216
virtual Object_creation_ctx *create_backup_ctx(THD *thd) const;
218
virtual void change_env(THD *thd) const;
222
client_cs stores the value of character_set_client session variable.
223
The only character set attribute is used.
225
Client character set is included into query context, because we save
226
query in the original character set, which is client character set. So,
227
in order to parse the query properly we have to switch client character
230
CHARSET_INFO *m_client_cs;
233
connection_cl stores the value of collation_connection session
234
variable. Both character set and collation attributes are used.
236
Connection collation is included into query context, becase it defines
237
the character set and collation of text literals in internal
238
representation of query (item-objects).
240
CHARSET_INFO *m_connection_cl;
162
#include <drizzled/object_creation_ctx.h>
245
164
Opening modes for open_temporary_table and open_table_from_share
494
413
#define MODE_NO_ENGINE_SUBSTITUTION (MODE_HIGH_NOT_PRECEDENCE*2)
495
414
#define MODE_PAD_CHAR_TO_FULL_LENGTH (1ULL << 31)
498
416
/* @@optimizer_switch flags */
499
417
#define OPTIMIZER_SWITCH_NO_MATERIALIZATION 1
500
418
#define OPTIMIZER_SWITCH_NO_SEMIJOIN 2
504
421
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
505
422
use strictly more than 64 bits by adding one more define above, you should
590
506
CHECK_FIELD_ERROR_FOR_NULL
594
/** Struct to handle simple linked lists. */
595
typedef struct st_sql_list {
600
st_sql_list() {} /* Remove gcc warning */
607
inline void link_in_list(uchar *element,uchar **next_ptr)
614
inline void save_and_clear(struct st_sql_list *save)
619
inline void push_front(struct st_sql_list *save)
621
*save->next= first; /* link current list last */
623
elements+= save->elements;
625
inline void push_back(struct st_sql_list *save)
631
elements+= save->elements;
637
509
extern pthread_key(THD*, THR_THD);
638
510
inline THD *_current_thd(void)