Commit 9b406e40 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/data0/bk/mysql-5.0

into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt


sql/mysqld.cc:
  Auto merged
parents 1ccd344f 9067ff96
show variables like 'collation_server';
Variable_name Value
collation_server ucs2_unicode_ci
show variables like "%character_set_ser%";
Variable_name Value
character_set_server ucs2
......
......@@ -421,6 +421,28 @@ set tmp_table_size=100;
set tx_isolation="READ-COMMITTED";
set wait_timeout=100;
set log_warnings=1;
select @@session.insert_id;
@@session.insert_id
1
set @save_insert_id=@@session.insert_id;
set session insert_id=20;
select @@session.insert_id;
@@session.insert_id
20
set session last_insert_id=100;
select @@session.insert_id;
@@session.insert_id
20
select @@session.last_insert_id;
@@session.last_insert_id
100
select @@session.insert_id;
@@session.insert_id
20
set @@session.insert_id=@save_insert_id;
select @@session.insert_id;
@@session.insert_id
1
create table t1 (a int not null auto_increment, primary key(a));
create table t2 (a int not null auto_increment, primary key(a));
insert into t1 values(null),(null),(null);
......
--default-character-set=ucs2 --default-collation=ucs2_unicode_ci
--default-collation=ucs2_unicode_ci --default-character-set=ucs2
#
# MySQL Bug#15276: MySQL ignores collation-server
#
show variables like 'collation_server';
#
# Bug#18004 Connecting crashes server when default charset is UCS2
#
......
......@@ -301,6 +301,22 @@ set tx_isolation="READ-COMMITTED";
set wait_timeout=100;
set log_warnings=1;
#
# Bugs: #20392: INSERT_ID session variable has weird value
#
select @@session.insert_id;
set @save_insert_id=@@session.insert_id;
set session insert_id=20;
select @@session.insert_id;
set session last_insert_id=100;
select @@session.insert_id;
select @@session.last_insert_id;
select @@session.insert_id;
set @@session.insert_id=@save_insert_id;
select @@session.insert_id;
#
# key buffer
#
......
......@@ -245,6 +245,22 @@ void setEnvString(char *ret, const char *name, const char *value)
DBUG_VOID_RETURN ;
}
/*
my_paramter_handler
Invalid paramter handler we will use instead of the one "baked" into the CRT
for MSC v8. This one just prints out what invalid parameter was encountered.
By providing this routine, routines like lseek will return -1 when we expect them
to instead of crash.
*/
void my_parameter_handler(const wchar_t * expression, const wchar_t * function,
const wchar_t * file, unsigned int line,
uintptr_t pReserved)
{
DBUG_PRINT("my",("Expression: %s function: %s file: %s, line: %d",
expression, function, file, line));
}
static void my_win_init(void)
{
HKEY hSoftMysql ;
......@@ -262,12 +278,18 @@ static void my_win_init(void)
setlocale(LC_CTYPE, ""); /* To get right sortorder */
#if defined(_MSC_VER) && (_MSC_VER < 1300)
#if defined(_MSC_VER)
#if _MSC_VER < 1300
/*
Clear the OS system variable TZ and avoid the 100% CPU usage
Only for old versions of Visual C++
*/
_putenv( "TZ=" );
#endif
#if _MSC_VER >= 1400
/* this is required to make crt functions return -1 appropriately */
_set_invalid_parameter_handler(my_parameter_handler);
#endif
#endif
_tzset();
......
......@@ -314,6 +314,7 @@ static char *default_character_set_name;
static char *character_set_filesystem_name;
static char *my_bind_addr_str;
static char *default_collation_name;
static char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME;
static char mysql_data_home_buff[2];
static struct passwd *user_info;
static I_List<THD> thread_cache;
......@@ -6382,7 +6383,7 @@ static void mysql_init_variables(void)
/* Variables in libraries */
charsets_dir= 0;
default_character_set_name= (char*) MYSQL_DEFAULT_CHARSET_NAME;
default_collation_name= (char*) MYSQL_DEFAULT_COLLATION_NAME;
default_collation_name= compiled_default_collation_name;
sys_charset_system.value= (char*) system_charset_info->csname;
character_set_filesystem_name= (char*) "binary";
......@@ -6544,7 +6545,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
strmake(mysql_home,argument,sizeof(mysql_home)-1);
break;
case 'C':
default_collation_name= 0;
if (default_collation_name == compiled_default_collation_name)
default_collation_name= 0;
break;
case 'l':
opt_log=1;
......
......@@ -2578,7 +2578,7 @@ bool sys_var_insert_id::update(THD *thd, set_var *var)
byte *sys_var_insert_id::value_ptr(THD *thd, enum_var_type type,
LEX_STRING *base)
{
return (byte*) &thd->current_insert_id;
return (byte*) &thd->next_insert_id;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment