summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 4c71e845207..e6c44f949ab 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -75,22 +75,30 @@ char* query_table_status(THD *thd,const char *db,const char *table_name);
#define MAX_FIELDS_BEFORE_HASH 32
#define USER_VARS_HASH_SIZE 16
#define STACK_MIN_SIZE 8192 // Abort if less stack during eval.
+#define STACK_BUFF_ALLOC 32 // For stack overrun checks
#ifndef MYSQLD_NET_RETRY_COUNT
#define MYSQLD_NET_RETRY_COUNT 10 // Abort read after this many int.
#endif
#define TEMP_POOL_SIZE 128
-/* The following parameters is to decide when to use an extra cache to
- optimise seeks when reading a big table in sorted order */
+/*
+ The following parameters is to decide when to use an extra cache to
+ optimise seeks when reading a big table in sorted order
+*/
#define MIN_FILE_LENGTH_TO_USE_ROW_CACHE (16L*1024*1024)
#define MIN_ROWS_TO_USE_TABLE_CACHE 100
-// The following is used to decide if MySQL should use table scanning
-// instead of reading with keys. The number says how many evaluation of the
-// WHERE clause is comparable to reading one extra row from a table.
+/*
+ The following is used to decide if MySQL should use table scanning
+ instead of reading with keys. The number says how many evaluation of the
+ WHERE clause is comparable to reading one extra row from a table.
+*/
#define TIME_FOR_COMPARE 5 // 5 compares == one read
-// Number of rows in a reference table when refereed through a not unique key.
-// This value is only used when we don't know anything about the key
-// distribution.
+
+/*
+ Number of rows in a reference table when refereed through a not unique key.
+ This value is only used when we don't know anything about the key
+ distribution.
+*/
#define MATCHING_ROWS_IN_OTHER_TABLE 10
/* Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used) */
@@ -474,8 +482,9 @@ int mysql_ha_read(THD *, TABLE_LIST *,enum enum_ha_read_modes,char *,
void set_item_name(Item *item,char *pos,uint length);
bool add_field_to_list(char *field_name, enum enum_field_types type,
char *length, char *decimal,
- uint type_modifier, Item *default_value,char *change,
- TYPELIB *interval);
+ uint type_modifier,
+ Item *default_value, Item *comment,
+ char *change, TYPELIB *interval);
void store_position_for_column(const char *name);
bool add_to_list(SQL_LIST &list,Item *group,bool asc=0);
TABLE_LIST *add_table_to_list(Table_ident *table,LEX_STRING *alias,
@@ -610,7 +619,7 @@ extern pthread_cond_t COND_refresh,COND_thread_count;
extern pthread_attr_t connection_attrib;
extern bool opt_endinfo, using_udf_functions, locked_in_memory,
opt_using_transactions, use_temp_pool, mysql_embedded;
-extern bool opt_local_infile;
+extern my_bool opt_local_infile;
extern char f_fyllchar;
extern ulong ha_read_count, ha_write_count, ha_delete_count, ha_update_count,
ha_read_key_count, ha_read_next_count, ha_read_prev_count,
@@ -726,7 +735,7 @@ ulong get_form_pos(File file, uchar *head, TYPELIB *save_names);
ulong make_new_entry(File file,uchar *fileinfo,TYPELIB *formnames,
const char *newname);
ulong next_io_size(ulong pos);
-void append_unescaped(String *res,const char *pos);
+void append_unescaped(String *res, const char *pos, uint length);
int create_frm(char *name,uint reclength,uchar *fileinfo,
HA_CREATE_INFO *create_info, uint keys);
void update_create_info_from_table(HA_CREATE_INFO *info, TABLE *form);
@@ -739,7 +748,7 @@ int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *wildstr);
int wild_compare(const char *str,const char *str_end,
const char *wildstr,const char *wildend,char escape);
int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *str_end,
- const char *wildstr,const char *wildend,char escape);
+ const char *wildstr,const char *wildend,char escape);
/* from hostname.cc */
struct in_addr;