Fix value returned from SELECT of unsigned long system

variables. (Bug #10351)


mysql-test/r/variables.result:
  Update results
mysql-test/t/variables.test:
  Add regression test
sql/item.h:
  Add Item_uint(ulong) constructor
sql/mysqld.cc:
  Fix default/max max_seeks_for_key to UINT_MAX32
sql/set_var.cc:
  Use correct Item_uint() constructors in sys_var::item()
This commit is contained in:
unknown 2005-07-22 16:18:34 -07:00
commit c055edc631
5 changed files with 26 additions and 3 deletions

View file

@ -1679,7 +1679,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
pthread_mutex_lock(&LOCK_global_system_variables);
value= *(uint*) value_ptr(thd, var_type, base);
pthread_mutex_unlock(&LOCK_global_system_variables);
return new Item_uint((int32) value);
return new Item_uint((uint32) value);
}
case SHOW_LONG:
{
@ -1687,7 +1687,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
pthread_mutex_lock(&LOCK_global_system_variables);
value= *(ulong*) value_ptr(thd, var_type, base);
pthread_mutex_unlock(&LOCK_global_system_variables);
return new Item_uint((int32) value);
return new Item_uint(value);
}
case SHOW_LONGLONG:
{