~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/server_includes.h

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
                      bool skip_error);
77
77
 
78
78
/* sql_parse.cc */
79
 
void mysql_parse(THD *thd, const char *inBuf, uint length,
 
79
void mysql_parse(THD *thd, const char *inBuf, uint32_t length,
80
80
                 const char ** semicolon);
81
81
 
82
 
bool mysql_test_parse_for_slave(THD *thd,char *inBuf,uint length);
 
82
bool mysql_test_parse_for_slave(THD *thd,char *inBuf,uint32_t length);
83
83
 
84
84
 
85
85
bool is_update_query(enum enum_sql_command command);
86
86
 
87
 
bool alloc_query(THD *thd, const char *packet, uint packet_length);
 
87
bool alloc_query(THD *thd, const char *packet, uint32_t packet_length);
88
88
 
89
89
void mysql_reset_thd_for_next_command(THD *thd);
90
90
 
99
99
bool do_command(THD *thd);
100
100
 
101
101
bool dispatch_command(enum enum_server_command command, THD *thd,
102
 
                      char* packet, uint packet_length);
 
102
                      char* packet, uint32_t packet_length);
103
103
 
104
104
void log_slow_statement(THD *thd);
105
105
 
121
121
bool check_table_access(THD *thd, ulong want_access, TableList *tables,
122
122
                        bool no_errors,
123
123
                        bool any_combination_of_privileges_will_do,
124
 
                        uint number);
 
124
                        uint32_t number);
125
125
/*
126
126
  General routine to change field->ptr of a NULL-terminated array of Field
127
127
  objects. Useful when needed to call val_int, val_str or similar and the
140
140
bool table_def_init(void);
141
141
void table_def_free(void);
142
142
void assign_new_table_id(TABLE_SHARE *share);
143
 
uint cached_open_tables(void);
144
 
uint cached_table_definitions(void);
 
143
uint32_t cached_open_tables(void);
 
144
uint32_t cached_table_definitions(void);
145
145
 
146
146
/* drizzled.cc */
147
147
void kill_mysql(void);
148
 
void close_connection(THD *thd, uint errcode, bool lock);
 
148
void close_connection(THD *thd, uint32_t errcode, bool lock);
149
149
 
150
150
/* sql_select.cc */
151
151
Table *create_virtual_tmp_table(THD *thd, List<Create_field> &field_list);
153
153
/* handler.cc */
154
154
bool mysql_xa_recover(THD *thd);
155
155
 
156
 
SORT_FIELD * make_unireg_sortorder(order_st *order, uint *length,
 
156
SORT_FIELD * make_unireg_sortorder(order_st *order, uint32_t *length,
157
157
                                  SORT_FIELD *sortorder);
158
158
int setup_order(THD *thd, Item **ref_pointer_array, TableList *tables,
159
159
                List<Item> &fields, List <Item> &all_fields, order_st *order);
166
166
bool handle_select(THD *thd, LEX *lex, select_result *result,
167
167
                   ulong setup_tables_done_option);
168
168
bool mysql_select(THD *thd, Item ***rref_pointer_array,
169
 
                  TableList *tables, uint wild_num,  List<Item> &list,
170
 
                  COND *conds, uint og_num, order_st *order, order_st *group,
 
169
                  TableList *tables, uint32_t wild_num,  List<Item> &list,
 
170
                  COND *conds, uint32_t og_num, order_st *order, order_st *group,
171
171
                  Item *having, order_st *proc_param, uint64_t select_type, 
172
172
                  select_result *result, SELECT_LEX_UNIT *unit, 
173
173
                  SELECT_LEX *select_lex);
189
189
                        bool group, bool modify_item,
190
190
                        bool table_cant_handle_bit_fields,
191
191
                        bool make_copy_field,
192
 
                        uint convert_blob_length);
 
192
                        uint32_t convert_blob_length);
193
193
void sp_prepare_create_field(THD *thd, Create_field *sql_field);
194
194
int prepare_create_field(Create_field *sql_field, 
195
 
                         uint *blob_columns, 
 
195
                         uint32_t *blob_columns, 
196
196
                         int *timestamps, int *timestamps_with_niladic,
197
197
                         int64_t table_flags);
198
198
bool mysql_create_table(THD *thd,const char *db, const char *table_name,
199
199
                        HA_CREATE_INFO *create_info,
200
200
                        Alter_info *alter_info,
201
 
                        bool tmp_table, uint select_field_count);
 
201
                        bool tmp_table, uint32_t select_field_count);
202
202
bool mysql_create_table_no_lock(THD *thd, const char *db,
203
203
                                const char *table_name,
204
204
                                HA_CREATE_INFO *create_info,
205
205
                                Alter_info *alter_info,
206
 
                                bool tmp_table, uint select_field_count);
 
206
                                bool tmp_table, uint32_t select_field_count);
207
207
 
208
208
bool mysql_alter_table(THD *thd, char *new_db, char *new_name,
209
209
                       HA_CREATE_INFO *create_info,
210
210
                       TableList *table_list,
211
211
                       Alter_info *alter_info,
212
 
                       uint order_num, order_st *order, bool ignore);
 
212
                       uint32_t order_num, order_st *order, bool ignore);
213
213
bool mysql_recreate_table(THD *thd, TableList *table_list);
214
214
bool mysql_create_like_table(THD *thd, TableList *table,
215
215
                             TableList *src_table,
216
216
                             HA_CREATE_INFO *create_info);
217
217
bool mysql_rename_table(handlerton *base, const char *old_db,
218
218
                        const char * old_name, const char *new_db,
219
 
                        const char * new_name, uint flags);
 
219
                        const char * new_name, uint32_t flags);
220
220
bool mysql_prepare_update(THD *thd, TableList *table_list,
221
 
                          Item **conds, uint order_num, order_st *order);
 
221
                          Item **conds, uint32_t order_num, order_st *order);
222
222
int mysql_update(THD *thd,TableList *tables,List<Item> &fields,
223
223
                 List<Item> &values,COND *conds,
224
 
                 uint order_num, order_st *order, ha_rows limit,
 
224
                 uint32_t order_num, order_st *order, ha_rows limit,
225
225
                 enum enum_duplicates handle_duplicates, bool ignore);
226
226
bool mysql_multi_update(THD *thd, TableList *table_list,
227
227
                        List<Item> *fields, List<Item> *values,
246
246
                  SQL_LIST *order, ha_rows rows, uint64_t options,
247
247
                  bool reset_auto_increment);
248
248
bool mysql_truncate(THD *thd, TableList *table_list, bool dont_send_ok);
249
 
uint create_table_def_key(THD *thd, char *key, TableList *table_list,
 
249
uint32_t create_table_def_key(THD *thd, char *key, TableList *table_list,
250
250
                          bool tmp_table);
251
251
TABLE_SHARE *get_table_share(THD *thd, TableList *table_list, char *key,
252
 
                             uint key_length, uint db_flags, int *error);
 
252
                             uint32_t key_length, uint32_t db_flags, int *error);
253
253
void release_table_share(TABLE_SHARE *share, enum release_type type);
254
254
TABLE_SHARE *get_cached_table_share(const char *db, const char *table_name);
255
255
Table *open_ltable(THD *thd, TableList *table_list, thr_lock_type update,
256
 
                   uint lock_flags);
257
 
Table *open_table(THD *thd, TableList *table_list, bool *refresh, uint flags);
 
256
                   uint32_t lock_flags);
 
257
Table *open_table(THD *thd, TableList *table_list, bool *refresh, uint32_t flags);
258
258
bool name_lock_locked_table(THD *thd, TableList *tables);
259
259
bool reopen_name_locked_table(THD* thd, TableList* table_list, bool link_in);
260
260
Table *table_cache_insert_placeholder(THD *thd, const char *key,
261
 
                                      uint key_length);
 
261
                                      uint32_t key_length);
262
262
bool lock_table_name_if_not_cached(THD *thd, const char *db,
263
263
                                   const char *table_name, Table **table);
264
264
Table *find_locked_table(THD *thd, const char *db,const char *table_name);
271
271
                                      const char *table_name);
272
272
void close_handle_and_leave_table_as_lock(Table *table);
273
273
bool open_new_frm(THD *thd, TABLE_SHARE *share, const char *alias,
274
 
                  uint db_stat, uint prgflag,
275
 
                  uint ha_open_flags, Table *outparam,
 
274
                  uint32_t db_stat, uint32_t prgflag,
 
275
                  uint32_t ha_open_flags, Table *outparam,
276
276
                  TableList *table_desc, MEM_ROOT *mem_root);
277
277
bool wait_for_tables(THD *thd);
278
278
bool table_is_used(Table *table, bool wait_for_name_lock);
293
293
                     bool check_privileges, bool register_tree_change);
294
294
Field *
295
295
find_field_in_table_ref(THD *thd, TableList *table_list,
296
 
                        const char *name, uint length,
 
296
                        const char *name, uint32_t length,
297
297
                        const char *item_name, const char *db_name,
298
298
                        const char *table_name, Item **ref,
299
299
                        bool check_privileges, bool allow_rowid,
300
 
                        uint *cached_field_index_ptr,
 
300
                        uint32_t *cached_field_index_ptr,
301
301
                        bool register_tree_change, TableList **actual_table);
302
302
Field *
303
 
find_field_in_table(THD *thd, Table *table, const char *name, uint length,
304
 
                    bool allow_rowid, uint *cached_field_index_ptr);
 
303
find_field_in_table(THD *thd, Table *table, const char *name, uint32_t length,
 
304
                    bool allow_rowid, uint32_t *cached_field_index_ptr);
305
305
Field *
306
306
find_field_in_table_sef(Table *table, const char *name);
307
307
 
346
346
 
347
347
/* sql_base.cc */
348
348
#define TMP_TABLE_KEY_EXTRA 8
349
 
void set_item_name(Item *item,char *pos,uint length);
 
349
void set_item_name(Item *item,char *pos,uint32_t length);
350
350
bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum enum_field_types type,
351
351
                       char *length, char *decimal,
352
 
                       uint type_modifier,
 
352
                       uint32_t type_modifier,
353
353
                       enum column_format_type column_format,
354
354
                       Item *default_value, Item *on_update_value,
355
355
                       LEX_STRING *comment,
357
357
                       const CHARSET_INFO * const cs);
358
358
Create_field * new_create_field(THD *thd, char *field_name, enum_field_types type,
359
359
                                char *length, char *decimals,
360
 
                                uint type_modifier, 
 
360
                                uint32_t type_modifier, 
361
361
                                Item *default_value, Item *on_update_value,
362
362
                                LEX_STRING *comment, char *change, 
363
363
                                List<String> *interval_list, CHARSET_INFO *cs);
408
408
  RESOLVED_WITH_NO_ALIAS,
409
409
  RESOLVED_AGAINST_ALIAS
410
410
};
411
 
Item ** find_item_in_list(Item *item, List<Item> &items, uint *counter,
 
411
Item ** find_item_in_list(Item *item, List<Item> &items, uint32_t *counter,
412
412
                          find_item_error_report_type report_error,
413
413
                          enum_resolution_type *resolution);
414
414
bool get_key_map_from_key_list(key_map *map, Table *table,
426
426
                                   TableList **leaves, 
427
427
                                   bool select_insert);
428
428
int setup_wild(THD *thd, TableList *tables, List<Item> &fields,
429
 
               List<Item> *sum_func_list, uint wild_num);
 
429
               List<Item> *sum_func_list, uint32_t wild_num);
430
430
bool setup_fields(THD *thd, Item** ref_pointer_array,
431
431
                  List<Item> &item, enum_mark_columns mark_used_columns,
432
432
                  List<Item> *sum_func_list, bool allow_sum_func);
447
447
int init_ftfuncs(THD *thd, SELECT_LEX* select, bool no_order);
448
448
void wait_for_condition(THD *thd, pthread_mutex_t *mutex,
449
449
                        pthread_cond_t *cond);
450
 
int open_tables(THD *thd, TableList **tables, uint *counter, uint flags);
 
450
int open_tables(THD *thd, TableList **tables, uint32_t *counter, uint32_t flags);
451
451
/* open_and_lock_tables with optional derived handling */
452
452
int open_and_lock_tables_derived(THD *thd, TableList *tables, bool derived);
453
453
/* simple open_and_lock_tables without derived handling */
463
463
/* simple open_and_lock_tables without derived handling for single table */
464
464
Table *open_n_lock_single_table(THD *thd, TableList *table_l,
465
465
                                thr_lock_type lock_type);
466
 
bool open_normal_and_derived_tables(THD *thd, TableList *tables, uint flags);
467
 
int lock_tables(THD *thd, TableList *tables, uint counter, bool *need_reopen);
 
466
bool open_normal_and_derived_tables(THD *thd, TableList *tables, uint32_t flags);
 
467
int lock_tables(THD *thd, TableList *tables, uint32_t counter, bool *need_reopen);
468
468
int decide_logging_format(THD *thd, TableList *tables);
469
469
Table *open_temporary_table(THD *thd, const char *path, const char *db,
470
470
                            const char *table_name, bool link_in_list,
500
500
#define RTFC_WAIT_OTHER_THREAD_FLAG 0x0002
501
501
#define RTFC_CHECK_KILLED_FLAG      0x0004
502
502
bool remove_table_from_cache(THD *thd, const char *db, const char *table,
503
 
                             uint flags);
 
503
                             uint32_t flags);
504
504
 
505
505
#define NORMAL_PART_NAME 0
506
506
#define TEMP_PART_NAME 1
555
555
/* sql_test.cc */
556
556
void print_where(COND *cond,const char *info, enum_query_type query_type);
557
557
void print_cached_tables(void);
558
 
void TEST_filesort(SORT_FIELD *sortorder,uint s_length);
559
 
void print_plan(JOIN* join,uint idx, double record_count, double read_time,
 
558
void TEST_filesort(SORT_FIELD *sortorder,uint32_t s_length);
 
559
void print_plan(JOIN* join,uint32_t idx, double record_count, double read_time,
560
560
                double current_read_time, const char *info);
561
561
void print_keyuse_array(DYNAMIC_ARRAY *keyuse_array);
562
562
void dump_TableList_graph(SELECT_LEX *select_lex, TableList* tl);
563
563
void mysql_print_status();
564
564
 
565
565
/* key.cc */
566
 
int find_ref_key(KEY *key, uint key_count, unsigned char *record, Field *field,
567
 
                 uint *key_length, uint *keypart);
568
 
void key_copy(unsigned char *to_key, unsigned char *from_record, KEY *key_info, uint key_length);
 
566
int find_ref_key(KEY *key, uint32_t key_count, unsigned char *record, Field *field,
 
567
                 uint32_t *key_length, uint32_t *keypart);
 
568
void key_copy(unsigned char *to_key, unsigned char *from_record, KEY *key_info, uint32_t key_length);
569
569
void key_restore(unsigned char *to_record, unsigned char *from_key, KEY *key_info,
570
570
                 uint16_t key_length);
571
571
void key_zero_nulls(unsigned char *tuple, KEY *key_info);
572
 
bool key_cmp_if_same(Table *form,const unsigned char *key,uint index,uint key_length);
573
 
void key_unpack(String *to,Table *form,uint index);
574
 
bool is_key_used(Table *table, uint idx, const MY_BITMAP *fields);
575
 
int key_cmp(KEY_PART_INFO *key_part, const unsigned char *key, uint key_length);
 
572
bool key_cmp_if_same(Table *form,const unsigned char *key,uint32_t index,uint32_t key_length);
 
573
void key_unpack(String *to,Table *form,uint32_t index);
 
574
bool is_key_used(Table *table, uint32_t idx, const MY_BITMAP *fields);
 
575
int key_cmp(KEY_PART_INFO *key_part, const unsigned char *key, uint32_t key_length);
576
576
extern "C" int key_rec_cmp(void *key_info, unsigned char *a, unsigned char *b);
577
577
 
578
578
bool init_errmessage(void);
591
591
 
592
592
/* item_func.cc */
593
593
extern bool check_reserved_words(LEX_STRING *name);
594
 
extern enum_field_types agg_field_type(Item **items, uint nitems);
 
594
extern enum_field_types agg_field_type(Item **items, uint32_t nitems);
595
595
 
596
596
/* strfunc.cc */
597
 
uint64_t find_set(TYPELIB *lib, const char *x, uint length, const CHARSET_INFO * const cs,
598
 
                   char **err_pos, uint *err_len, bool *set_warning);
599
 
uint find_type(const TYPELIB *lib, const char *find, uint length,
 
597
uint64_t find_set(TYPELIB *lib, const char *x, uint32_t length, const CHARSET_INFO * const cs,
 
598
                   char **err_pos, uint32_t *err_len, bool *set_warning);
 
599
uint32_t find_type(const TYPELIB *lib, const char *find, uint32_t length,
600
600
               bool part_match);
601
 
uint find_type2(const TYPELIB *lib, const char *find, uint length,
 
601
uint32_t find_type2(const TYPELIB *lib, const char *find, uint32_t length,
602
602
                const CHARSET_INFO *cs);
603
603
void unhex_type2(TYPELIB *lib);
604
 
uint check_word(TYPELIB *lib, const char *val, const char *end,
 
604
uint32_t check_word(TYPELIB *lib, const char *val, const char *end,
605
605
                const char **end_of_word);
606
606
int find_string_in_array(LEX_STRING * const haystack, LEX_STRING * const needle,
607
607
                         const CHARSET_INFO * const cs);
608
608
 
609
609
 
610
 
bool is_keyword(const char *name, uint len);
 
610
bool is_keyword(const char *name, uint32_t len);
611
611
 
612
612
#define MY_DB_OPT_FILE "db.opt"
613
613
bool my_database_names_init(void);
660
660
extern ulong max_connections,max_connect_errors, connect_timeout;
661
661
extern bool slave_allow_batching;
662
662
extern ulong slave_net_timeout, slave_trans_retries;
663
 
extern uint max_user_connections;
 
663
extern uint32_t max_user_connections;
664
664
extern ulong what_to_log,flush_time;
665
665
extern ulong binlog_cache_size, max_binlog_cache_size, open_files_limit;
666
666
extern ulong max_binlog_size, max_relay_log_size;
673
673
extern ulong tc_log_page_waits;
674
674
extern bool relay_log_purge;
675
675
extern bool opt_innodb_safe_binlog, opt_innodb;
676
 
extern uint test_flags,select_errors,ha_open_options;
677
 
extern uint protocol_version, mysqld_port, dropping_tables;
678
 
extern uint delay_key_write_options;
 
676
extern uint32_t test_flags,select_errors,ha_open_options;
 
677
extern uint32_t protocol_version, mysqld_port, dropping_tables;
 
678
extern uint32_t delay_key_write_options;
679
679
extern bool opt_endinfo, using_udf_functions;
680
680
extern bool locked_in_memory;
681
681
extern bool opt_using_transactions;
687
687
extern bool opt_log_queries_not_using_indexes;
688
688
extern bool opt_character_set_client_handshake;
689
689
extern bool volatile abort_loop, shutdown_in_progress;
690
 
extern uint volatile thread_count, thread_running, global_read_lock;
691
 
extern uint connection_count;
 
690
extern uint32_t volatile thread_count, thread_running, global_read_lock;
 
691
extern uint32_t connection_count;
692
692
extern bool opt_sql_bin_update;
693
693
extern bool opt_safe_user_create;
694
694
extern bool opt_no_mix_types;
704
704
extern bool opt_log_slow_slave_statements;
705
705
extern bool opt_noacl;
706
706
extern bool opt_old_style_user_limits;
707
 
extern uint opt_crash_binlog_innodb;
 
707
extern uint32_t opt_crash_binlog_innodb;
708
708
extern char *default_tz_name;
709
709
extern char *opt_logname, *opt_slow_logname;
710
710
extern const char *log_output_str;
748
748
extern scheduler_functions thread_scheduler;
749
749
extern TYPELIB thread_handling_typelib;
750
750
extern uint8_t uc_update_queries[SQLCOM_END+1];
751
 
extern uint sql_command_flags[];
 
751
extern uint32_t sql_command_flags[];
752
752
extern TYPELIB log_output_typelib;
753
753
 
754
754
/* optional things, have_* variables */
763
763
 
764
764
extern pthread_t signal_thread;
765
765
 
766
 
DRIZZLE_LOCK *mysql_lock_tables(THD *thd, Table **table, uint count,
767
 
                              uint flags, bool *need_reopen);
 
766
DRIZZLE_LOCK *mysql_lock_tables(THD *thd, Table **table, uint32_t count,
 
767
                              uint32_t flags, bool *need_reopen);
768
768
/* mysql_lock_tables() and open_table() flags bits */
769
769
#define DRIZZLE_LOCK_IGNORE_GLOBAL_READ_LOCK      0x0001
770
770
#define DRIZZLE_LOCK_IGNORE_FLUSH                 0x0002
775
775
 
776
776
void mysql_unlock_tables(THD *thd, DRIZZLE_LOCK *sql_lock);
777
777
void mysql_unlock_read_tables(THD *thd, DRIZZLE_LOCK *sql_lock);
778
 
void mysql_unlock_some_tables(THD *thd, Table **table,uint count);
 
778
void mysql_unlock_some_tables(THD *thd, Table **table,uint32_t count);
779
779
void mysql_lock_remove(THD *thd, DRIZZLE_LOCK *locked,Table *table,
780
780
                       bool always_unlock);
781
781
void mysql_lock_abort(THD *thd, Table *table, bool upgrade_lock);
822
822
                      const char *db, const char *table,
823
823
                      HA_CREATE_INFO *create_info,
824
824
                      List<Create_field> &create_field,
825
 
                      uint key_count,KEY *key_info,handler *db_type);
 
825
                      uint32_t key_count,KEY *key_info,handler *db_type);
826
826
int rea_create_table(THD *thd, const char *path,
827
827
                     const char *db, const char *table_name,
828
828
                     HA_CREATE_INFO *create_info,
829
829
                     List<Create_field> &create_field,
830
 
                     uint key_count,KEY *key_info,
 
830
                     uint32_t key_count,KEY *key_info,
831
831
                     handler *file);
832
 
int format_number(uint inputflag,uint max_length,char * pos,uint length,
 
832
int format_number(uint32_t inputflag,uint32_t max_length,char * pos,uint32_t length,
833
833
                  char * *errpos);
834
834
 
835
835
/* table.cc */
836
836
TABLE_SHARE *alloc_table_share(TableList *table_list, char *key,
837
 
                               uint key_length);
 
837
                               uint32_t key_length);
838
838
void init_tmp_table_share(THD *thd, TABLE_SHARE *share, const char *key,
839
 
                          uint key_length,
 
839
                          uint32_t key_length,
840
840
                          const char *table_name, const char *path);
841
841
void free_table_share(TABLE_SHARE *share);
842
 
int open_table_def(THD *thd, TABLE_SHARE *share, uint db_flags);
 
842
int open_table_def(THD *thd, TABLE_SHARE *share, uint32_t db_flags);
843
843
void open_table_error(TABLE_SHARE *share, int error, int db_errno, int errarg);
844
844
int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
845
 
                          uint db_stat, uint prgflag, uint ha_open_flags,
 
845
                          uint32_t db_stat, uint32_t prgflag, uint32_t ha_open_flags,
846
846
                          Table *outparam, open_table_mode open_mode);
847
847
int readfrm(const char *name, unsigned char **data, size_t *length);
848
848
int writefrm(const char* name, const unsigned char* data, size_t len);
852
852
int set_zone(int nr,int min_zone,int max_zone);
853
853
ulong convert_period_to_month(ulong period);
854
854
ulong convert_month_to_period(ulong month);
855
 
void get_date_from_daynr(long daynr,uint *year, uint *month,
856
 
                         uint *day);
 
855
void get_date_from_daynr(long daynr,uint32_t *year, uint32_t *month,
 
856
                         uint32_t *day);
857
857
my_time_t TIME_to_timestamp(THD *thd, const DRIZZLE_TIME *t, bool *not_exist);
858
 
bool str_to_time_with_warn(const char *str,uint length,DRIZZLE_TIME *l_time);
859
 
enum enum_drizzle_timestamp_type str_to_datetime_with_warn(const char *str, uint length,
860
 
                                         DRIZZLE_TIME *l_time, uint flags);
 
858
bool str_to_time_with_warn(const char *str,uint32_t length,DRIZZLE_TIME *l_time);
 
859
enum enum_drizzle_timestamp_type str_to_datetime_with_warn(const char *str, uint32_t length,
 
860
                                         DRIZZLE_TIME *l_time, uint32_t flags);
861
861
void localtime_to_TIME(DRIZZLE_TIME *to, struct tm *from);
862
862
void calc_time_from_sec(DRIZZLE_TIME *to, long seconds, long microseconds);
863
863
 
864
864
void make_truncated_value_warning(THD *thd, DRIZZLE_ERROR::enum_warning_level level,
865
865
                                  const char *str_val,
866
 
                                  uint str_length, enum enum_drizzle_timestamp_type time_type,
 
866
                                  uint32_t str_length, enum enum_drizzle_timestamp_type time_type,
867
867
                                  const char *field_name);
868
868
 
869
869
bool date_add_interval(DRIZZLE_TIME *ltime, interval_type int_type, INTERVAL interval);
874
874
 
875
875
extern DATE_TIME_FORMAT *date_time_format_make(enum enum_drizzle_timestamp_type format_type,
876
876
                                               const char *format_str,
877
 
                                               uint format_length);
 
877
                                               uint32_t format_length);
878
878
extern DATE_TIME_FORMAT *date_time_format_copy(THD *thd,
879
879
                                               DATE_TIME_FORMAT *format);
880
880
const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format,
897
897
                      SQL_SELECT *select,
898
898
                      int use_record_cache, bool print_errors);
899
899
void init_read_record_idx(READ_RECORD *info, THD *thd, Table *table, 
900
 
                          bool print_error, uint idx);
 
900
                          bool print_error, uint32_t idx);
901
901
void end_read_record(READ_RECORD *info);
902
902
ha_rows filesort(THD *thd, Table *form,struct st_sort_field *sortorder,
903
 
                 uint s_length, SQL_SELECT *select,
 
903
                 uint32_t s_length, SQL_SELECT *select,
904
904
                 ha_rows max_rows, bool sort_positions,
905
905
                 ha_rows *examined_rows);
906
906
void filesort_free_buffers(Table *table, bool full);
910
910
int get_quick_record(SQL_SELECT *select);
911
911
 
912
912
int calc_weekday(long daynr,bool sunday_first_day_of_week);
913
 
uint calc_week(DRIZZLE_TIME *l_time, uint week_behaviour, uint *year);
914
 
void find_date(char *pos,uint *vek,uint flag);
 
913
uint32_t calc_week(DRIZZLE_TIME *l_time, uint32_t week_behaviour, uint32_t *year);
 
914
void find_date(char *pos,uint32_t *vek,uint32_t flag);
915
915
TYPELIB *convert_strings_to_array_type(char * *typelibs, char * *end);
916
916
TYPELIB *typelib(MEM_ROOT *mem_root, List<String> &strings);
917
917
ulong get_form_pos(File file, unsigned char *head, TYPELIB *save_names);
918
918
ulong make_new_entry(File file,unsigned char *fileinfo,TYPELIB *formnames,
919
919
                     const char *newname);
920
920
ulong next_io_size(ulong pos);
921
 
void append_unescaped(String *res, const char *pos, uint length);
 
921
void append_unescaped(String *res, const char *pos, uint32_t length);
922
922
int create_frm(THD *thd, const char *name, const char *db, const char *table,
923
 
               uint reclength, unsigned char *fileinfo,
924
 
               HA_CREATE_INFO *create_info, uint keys, KEY *key_info);
 
923
               uint32_t reclength, unsigned char *fileinfo,
 
924
               HA_CREATE_INFO *create_info, uint32_t keys, KEY *key_info);
925
925
int rename_file_ext(const char * from,const char * to,const char * ext);
926
926
bool check_db_name(LEX_STRING *db);
927
927
bool check_column_name(const char *name);
928
 
bool check_table_name(const char *name, uint length);
 
928
bool check_table_name(const char *name, uint32_t length);
929
929
char *get_field(MEM_ROOT *mem, Field *field);
930
930
bool get_field(MEM_ROOT *mem, Field *field, class String *res);
931
931
char *fn_rext(char *name);
932
932
 
933
933
/* Conversion functions */
934
 
uint build_table_filename(char *buff, size_t bufflen, const char *db,
935
 
                          const char *table, const char *ext, uint flags);
 
934
uint32_t build_table_filename(char *buff, size_t bufflen, const char *db,
 
935
                          const char *table, const char *ext, uint32_t flags);
936
936
 
937
937
#define MYSQL50_TABLE_NAME_PREFIX         "#mysql50#"
938
938
#define MYSQL50_TABLE_NAME_PREFIX_LENGTH  9
984
984
  memset(table->null_flags, 255, table->s->null_bytes);
985
985
}
986
986
 
987
 
inline void table_case_convert(char * name, uint length)
 
987
inline void table_case_convert(char * name, uint32_t length)
988
988
{
989
989
  if (lower_case_table_names)
990
990
    files_charset_info->cset->casedn(files_charset_info,
1022
1022
  @param table_list   TableList structure pointer (owner of Table)
1023
1023
  @param tablenr     table number
1024
1024
*/
1025
 
inline void setup_table_map(Table *table, TableList *table_list, uint tablenr)
 
1025
inline void setup_table_map(Table *table, TableList *table_list, uint32_t tablenr)
1026
1026
{
1027
1027
  table->used_fields= 0;
1028
1028
  table->const_table= 0;