Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0

into  c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1


BitKeeper/etc/config:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysys/default.c:
  Auto merged
scripts/Makefile.am:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/include/os0file.h:
  Auto merged
storage/innobase/include/read0read.h:
  Auto merged
storage/innobase/include/read0types.h:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/innobase/os/os0file.c:
  Auto merged
storage/innobase/read/read0read.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/innobase/srv/srv0srv.c:
  Auto merged
storage/innobase/srv/srv0start.c:
  Auto merged
storage/innobase/trx/trx0sys.c:
  Auto merged
storage/innobase/trx/trx0trx.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/ndb/include/mgmapi/mgmapi.h:
  Auto merged
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
  Auto merged
storage/ndb/src/common/portlib/NdbMutex.c:
  Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.hpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  Manual merge 5.0 -> 5.1
mysql-test/t/alter_table.test:
  Manual merge 5.0 -> 5.1
sql/share/errmsg.txt:
  Manual merge 5.0 -> 5.1
storage/ndb/tools/Makefile.am:
  Manual merge 5.0 -> 5.1
This commit is contained in:
unknown 2005-08-05 18:01:34 -04:00
commit aca6f88ebb
597 changed files with 53026 additions and 2441 deletions

View file

@ -1431,6 +1431,12 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var)
if ((ulong) tmp > max_system_variables.*offset)
tmp= max_system_variables.*offset;
#if SIZEOF_LONG == 4
/* Avoid overflows on 32 bit systems */
if (tmp > (ulonglong) ~(ulong) 0)
tmp= ((ulonglong) ~(ulong) 0);
#endif
if (option_limits)
tmp= (ulong) getopt_ull_limit_value(tmp, option_limits);
if (var->type == OPT_GLOBAL)
@ -1684,7 +1690,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((ulonglong) value);
}
case SHOW_LONG:
{
@ -1692,7 +1698,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((ulonglong) value);
}
case SHOW_LONGLONG:
{
@ -3201,27 +3207,50 @@ bool sys_var_thd_table_type::update(THD *thd, set_var *var)
Functions to handle sql_mode
****************************************************************************/
byte *sys_var_thd_sql_mode::value_ptr(THD *thd, enum_var_type type,
LEX_STRING *base)
/*
Make string representation of mode
SYNOPSIS
thd in thread handler
val in sql_mode value
len out pointer on length of string
RETURN
pointer to string with sql_mode representation
*/
byte *sys_var_thd_sql_mode::symbolic_mode_representation(THD *thd, ulong val,
ulong *len)
{
ulong val;
char buff[256];
String tmp(buff, sizeof(buff), &my_charset_latin1);
ulong length;
tmp.length(0);
val= ((type == OPT_GLOBAL) ? global_system_variables.*offset :
thd->variables.*offset);
for (uint i= 0; val; val>>= 1, i++)
{
if (val & 1)
{
tmp.append(enum_names->type_names[i]);
tmp.append(sql_mode_typelib.type_names[i],
sql_mode_typelib.type_lengths[i]);
tmp.append(',');
}
}
if (tmp.length())
tmp.length(tmp.length() - 1);
return (byte*) thd->strmake(tmp.ptr(), tmp.length());
if ((length= tmp.length()))
length--;
*len= length;
return (byte*) thd->strmake(tmp.ptr(), length);
}
byte *sys_var_thd_sql_mode::value_ptr(THD *thd, enum_var_type type,
LEX_STRING *base)
{
ulong val= ((type == OPT_GLOBAL) ? global_system_variables.*offset :
thd->variables.*offset);
ulong length_unused;
return symbolic_mode_representation(thd, val, &length_unused);
}
@ -3233,6 +3262,7 @@ void sys_var_thd_sql_mode::set_default(THD *thd, enum_var_type type)
thd->variables.*offset= global_system_variables.*offset;
}
void fix_sql_mode_var(THD *thd, enum_var_type type)
{
if (type == OPT_GLOBAL)