Loading include/mysql_com.h +3 −3 Original line number Diff line number Diff line Loading @@ -164,9 +164,6 @@ enum enum_field_types { FIELD_TYPE_DECIMAL, FIELD_TYPE_TINY, extern "C" { #endif extern unsigned long max_allowed_packet; extern unsigned long net_buffer_length; int my_net_init(NET *net, Vio* vio); void net_end(NET *net); void net_clear(NET *net); Loading Loading @@ -225,6 +222,9 @@ typedef struct st_udf_init extern "C" { #endif extern unsigned long max_allowed_packet; extern unsigned long net_buffer_length; void randominit(struct rand_struct *,unsigned long seed1, unsigned long seed2); double rnd(struct rand_struct *); Loading libmysqld/lib_sql.cc +1 −1 Original line number Diff line number Diff line Loading @@ -220,7 +220,7 @@ check_connections2(THD * thd) if (thd->client_capabilities & CLIENT_CONNECT_WITH_DB) db=strend(passwd)+1; if (thd->client_capabilities & CLIENT_INTERACTIVE) thd->inactive_timeout=net_interactive_timeout; thd->inactive_timeout= thd->variables.net_interactive_timeout; if (thd->client_capabilities & CLIENT_TRANSACTIONS) thd->net.return_status= &thd->server_status; net->timeout=net_read_timeout; Loading mysys/my_getopt.c +14 −14 Original line number Diff line number Diff line Loading @@ -620,32 +620,32 @@ static void init_variables(const struct my_option *options) { switch (options->var_type) { case GET_BOOL: *((my_bool*) options->u_max_value)= *((my_bool*) options->value)= (my_bool) options->def_value; *((my_bool*) options->u_max_value)= (my_bool) options->max_value; *((my_bool*) options->value)= (my_bool) options->def_value; break; case GET_INT: *((int*) options->u_max_value)= *((int*) options->value)= (int) options->def_value; *((int*) options->u_max_value)= (int) options->max_value; *((int*) options->value)= (int) options->def_value; break; case GET_UINT: *((uint*) options->u_max_value)= *((uint*) options->value)= (uint) options->def_value; *((uint*) options->u_max_value)= (uint) options->max_value; *((uint*) options->value)= (uint) options->def_value; break; case GET_LONG: *((long*) options->u_max_value)= *((long*) options->value)= (long) options->def_value; *((long*) options->u_max_value)= (long) options->max_value; *((long*) options->value)= (long) options->def_value; break; case GET_ULONG: *((ulong*) options->u_max_value)= *((ulong*) options->value)= (ulong) options->def_value; *((ulong*) options->u_max_value)= (ulong) options->max_value; *((ulong*) options->value)= (ulong) options->def_value; break; case GET_LL: *((longlong*) options->u_max_value)= *((longlong*) options->value)= (longlong) options->def_value; *((longlong*) options->u_max_value)= (longlong) options->max_value; *((longlong*) options->value)= (longlong) options->def_value; break; case GET_ULL: *((ulonglong*) options->u_max_value)= *((ulonglong*) options->value)= (ulonglong) options->def_value; *((ulonglong*) options->u_max_value)= (ulonglong) options->max_value; *((ulonglong*) options->value)= (ulonglong) options->def_value; break; default: /* dummy default to avoid compiler warnings */ break; Loading sql/filesort.cc +8 −4 Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length, uchar **sort_keys; IO_CACHE tempfile, buffpek_pointers, *selected_records_file, *outfile; SORTPARAM param; THD *thd= current_thd; DBUG_ENTER("filesort"); DBUG_EXECUTE("info",TEST_filesort(sortorder,s_length,special);); #ifdef SKIP_DBUG_IN_FILESORT Loading Loading @@ -134,7 +136,7 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length, goto err; #endif memavl=sortbuff_size; memavl= thd->variables.sortbuff_size; while (memavl >= MIN_SORT_MEMORY) { ulong old_memavl; Loading @@ -149,7 +151,8 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length, } if (memavl < MIN_SORT_MEMORY) { my_error(ER_OUTOFMEMORY,MYF(ME_ERROR+ME_WAITTANG),sortbuff_size); my_error(ER_OUTOFMEMORY,MYF(ME_ERROR+ME_WAITTANG), thd->variables.sortbuff_size); goto err; } if (open_cached_file(&buffpek_pointers,mysql_tmpdir,TEMP_PREFIX, Loading Loading @@ -909,6 +912,7 @@ static uint sortlength(SORT_FIELD *sortorder, uint s_length) { reg2 uint length; THD *thd= current_thd; length=0; for (; s_length-- ; sortorder++) Loading @@ -916,7 +920,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length) if (sortorder->field) { if (sortorder->field->type() == FIELD_TYPE_BLOB) sortorder->length=max_item_sort_length; sortorder->length= thd->variables.max_item_sort_length; else { sortorder->length=sortorder->field->pack_length(); Loading Loading @@ -952,7 +956,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length) if (sortorder->item->maybe_null) length++; // Place for NULL marker } set_if_smaller(sortorder->length,max_item_sort_length); set_if_smaller(sortorder->length, thd->variables.max_item_sort_length); length+=sortorder->length; } sortorder->field= (Field*) 0; // end marker Loading sql/ha_heap.cc +2 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) ulong max_rows; HP_KEYDEF *keydef; HP_KEYSEG *seg; THD *thd= current_thd; for (key=parts=0 ; key < table->keys ; key++) parts+=table->key_info[key].key_parts; Loading Loading @@ -83,7 +84,7 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) } } mem_per_row += MY_ALIGN(table->reclength+1, sizeof(char*)); max_rows = (ulong) (max_heap_table_size / mem_per_row); max_rows = (ulong) (thd->variables.max_heap_table_size / mem_per_row); file=heap_open(name,mode, table->keys,keydef, table->reclength, Loading Loading
include/mysql_com.h +3 −3 Original line number Diff line number Diff line Loading @@ -164,9 +164,6 @@ enum enum_field_types { FIELD_TYPE_DECIMAL, FIELD_TYPE_TINY, extern "C" { #endif extern unsigned long max_allowed_packet; extern unsigned long net_buffer_length; int my_net_init(NET *net, Vio* vio); void net_end(NET *net); void net_clear(NET *net); Loading Loading @@ -225,6 +222,9 @@ typedef struct st_udf_init extern "C" { #endif extern unsigned long max_allowed_packet; extern unsigned long net_buffer_length; void randominit(struct rand_struct *,unsigned long seed1, unsigned long seed2); double rnd(struct rand_struct *); Loading
libmysqld/lib_sql.cc +1 −1 Original line number Diff line number Diff line Loading @@ -220,7 +220,7 @@ check_connections2(THD * thd) if (thd->client_capabilities & CLIENT_CONNECT_WITH_DB) db=strend(passwd)+1; if (thd->client_capabilities & CLIENT_INTERACTIVE) thd->inactive_timeout=net_interactive_timeout; thd->inactive_timeout= thd->variables.net_interactive_timeout; if (thd->client_capabilities & CLIENT_TRANSACTIONS) thd->net.return_status= &thd->server_status; net->timeout=net_read_timeout; Loading
mysys/my_getopt.c +14 −14 Original line number Diff line number Diff line Loading @@ -620,32 +620,32 @@ static void init_variables(const struct my_option *options) { switch (options->var_type) { case GET_BOOL: *((my_bool*) options->u_max_value)= *((my_bool*) options->value)= (my_bool) options->def_value; *((my_bool*) options->u_max_value)= (my_bool) options->max_value; *((my_bool*) options->value)= (my_bool) options->def_value; break; case GET_INT: *((int*) options->u_max_value)= *((int*) options->value)= (int) options->def_value; *((int*) options->u_max_value)= (int) options->max_value; *((int*) options->value)= (int) options->def_value; break; case GET_UINT: *((uint*) options->u_max_value)= *((uint*) options->value)= (uint) options->def_value; *((uint*) options->u_max_value)= (uint) options->max_value; *((uint*) options->value)= (uint) options->def_value; break; case GET_LONG: *((long*) options->u_max_value)= *((long*) options->value)= (long) options->def_value; *((long*) options->u_max_value)= (long) options->max_value; *((long*) options->value)= (long) options->def_value; break; case GET_ULONG: *((ulong*) options->u_max_value)= *((ulong*) options->value)= (ulong) options->def_value; *((ulong*) options->u_max_value)= (ulong) options->max_value; *((ulong*) options->value)= (ulong) options->def_value; break; case GET_LL: *((longlong*) options->u_max_value)= *((longlong*) options->value)= (longlong) options->def_value; *((longlong*) options->u_max_value)= (longlong) options->max_value; *((longlong*) options->value)= (longlong) options->def_value; break; case GET_ULL: *((ulonglong*) options->u_max_value)= *((ulonglong*) options->value)= (ulonglong) options->def_value; *((ulonglong*) options->u_max_value)= (ulonglong) options->max_value; *((ulonglong*) options->value)= (ulonglong) options->def_value; break; default: /* dummy default to avoid compiler warnings */ break; Loading
sql/filesort.cc +8 −4 Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length, uchar **sort_keys; IO_CACHE tempfile, buffpek_pointers, *selected_records_file, *outfile; SORTPARAM param; THD *thd= current_thd; DBUG_ENTER("filesort"); DBUG_EXECUTE("info",TEST_filesort(sortorder,s_length,special);); #ifdef SKIP_DBUG_IN_FILESORT Loading Loading @@ -134,7 +136,7 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length, goto err; #endif memavl=sortbuff_size; memavl= thd->variables.sortbuff_size; while (memavl >= MIN_SORT_MEMORY) { ulong old_memavl; Loading @@ -149,7 +151,8 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length, } if (memavl < MIN_SORT_MEMORY) { my_error(ER_OUTOFMEMORY,MYF(ME_ERROR+ME_WAITTANG),sortbuff_size); my_error(ER_OUTOFMEMORY,MYF(ME_ERROR+ME_WAITTANG), thd->variables.sortbuff_size); goto err; } if (open_cached_file(&buffpek_pointers,mysql_tmpdir,TEMP_PREFIX, Loading Loading @@ -909,6 +912,7 @@ static uint sortlength(SORT_FIELD *sortorder, uint s_length) { reg2 uint length; THD *thd= current_thd; length=0; for (; s_length-- ; sortorder++) Loading @@ -916,7 +920,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length) if (sortorder->field) { if (sortorder->field->type() == FIELD_TYPE_BLOB) sortorder->length=max_item_sort_length; sortorder->length= thd->variables.max_item_sort_length; else { sortorder->length=sortorder->field->pack_length(); Loading Loading @@ -952,7 +956,7 @@ sortlength(SORT_FIELD *sortorder, uint s_length) if (sortorder->item->maybe_null) length++; // Place for NULL marker } set_if_smaller(sortorder->length,max_item_sort_length); set_if_smaller(sortorder->length, thd->variables.max_item_sort_length); length+=sortorder->length; } sortorder->field= (Field*) 0; // end marker Loading
sql/ha_heap.cc +2 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) ulong max_rows; HP_KEYDEF *keydef; HP_KEYSEG *seg; THD *thd= current_thd; for (key=parts=0 ; key < table->keys ; key++) parts+=table->key_info[key].key_parts; Loading Loading @@ -83,7 +84,7 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) } } mem_per_row += MY_ALIGN(table->reclength+1, sizeof(char*)); max_rows = (ulong) (max_heap_table_size / mem_per_row); max_rows = (ulong) (thd->variables.max_heap_table_size / mem_per_row); file=heap_open(name,mode, table->keys,keydef, table->reclength, Loading