Commit 2c90e2f7 authored by jimw@mysql.com's avatar jimw@mysql.com

Merge mysql.com:/home/jimw/my/mysql-4.1-clean

into  mysql.com:/home/jimw/my/mysql-5.0-clean
parents 9b62dd15 746251a4
...@@ -230,7 +230,10 @@ int wait_for_server_start(char *bin_dir __attribute__((unused)), ...@@ -230,7 +230,10 @@ int wait_for_server_start(char *bin_dir __attribute__((unused)),
char *user, char *password, int port,char *tmp_dir) char *user, char *password, int port,char *tmp_dir)
{ {
arg_list_t al; arg_list_t al;
int err= 0, i; int err= 0;
#ifndef __WIN__
int i;
#endif
char trash[FN_REFLEN]; char trash[FN_REFLEN];
/* mysqladmin file */ /* mysqladmin file */
......
...@@ -1741,7 +1741,6 @@ int main(int argc, char **argv) ...@@ -1741,7 +1741,6 @@ int main(int argc, char **argv)
int* handle; int* handle;
char test[FN_LEN]; char test[FN_LEN];
char mask[FN_REFLEN]; char mask[FN_REFLEN];
char *p;
int position; int position;
/* single test */ /* single test */
......
...@@ -518,6 +518,14 @@ select ifnull(@@character_set_results,"really null"); ...@@ -518,6 +518,14 @@ select ifnull(@@character_set_results,"really null");
ifnull(@@character_set_results,"really null") ifnull(@@character_set_results,"really null")
really null really null
set names latin1; set names latin1;
select @@have_innodb;
@@have_innodb
#
set @test = @@query_prealloc_size;
set @@query_prealloc_size = @test;
select @@query_prealloc_size = @test;
@@query_prealloc_size = @test
1
create table t1 (a int); create table t1 (a int);
select a into @x from t1; select a into @x from t1;
Warnings: Warnings:
...@@ -542,9 +550,6 @@ set @@max_heap_table_size= 4294967296; ...@@ -542,9 +550,6 @@ set @@max_heap_table_size= 4294967296;
select @@max_heap_table_size > 0; select @@max_heap_table_size > 0;
@@max_heap_table_size > 0 @@max_heap_table_size > 0
1 1
select @@have_innodb;
@@have_innodb
#
select @@character_set_system; select @@character_set_system;
@@character_set_system @@character_set_system
utf8 utf8
......
...@@ -398,6 +398,21 @@ set character_set_results=NULL; ...@@ -398,6 +398,21 @@ set character_set_results=NULL;
select ifnull(@@character_set_results,"really null"); select ifnull(@@character_set_results,"really null");
set names latin1; set names latin1;
#
# Bug #9613: @@have_innodb
#
--replace_column 1 #
select @@have_innodb;
#
# Bug #13334: query_prealloc_size default less than minimum
#
set @test = @@query_prealloc_size;
set @@query_prealloc_size = @test;
select @@query_prealloc_size = @test;
# End of 4.1 tests # End of 4.1 tests
# #
...@@ -429,13 +444,6 @@ select @@max_heap_table_size > 0; ...@@ -429,13 +444,6 @@ select @@max_heap_table_size > 0;
set @@max_heap_table_size= 4294967296; set @@max_heap_table_size= 4294967296;
select @@max_heap_table_size > 0; select @@max_heap_table_size > 0;
#
# Bug #9613: @@have_innodb
#
--replace_column 1 #
select @@have_innodb;
# #
# Bug #11775 Variable character_set_system does not exist (sometimes) # Bug #11775 Variable character_set_system does not exist (sometimes)
# #
...@@ -444,3 +452,5 @@ select @@character_set_system; ...@@ -444,3 +452,5 @@ select @@character_set_system;
set global character_set_system = latin1; set global character_set_system = latin1;
--error 1238 --error 1238
set @@global.version_compile_os='234'; set @@global.version_compile_os='234';
# End of 5.0 tests
...@@ -4503,7 +4503,6 @@ Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name, ...@@ -4503,7 +4503,6 @@ Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name,
LEX_STRING component) LEX_STRING component)
{ {
sys_var *var; sys_var *var;
char buff[MAX_SYS_VAR_LENGTH*2+4+8], *pos;
LEX_STRING *base_name, *component_name; LEX_STRING *base_name, *component_name;
if (component.str == 0 && if (component.str == 0 &&
......
...@@ -5686,7 +5686,8 @@ The minimum value for this variable is 4096.", ...@@ -5686,7 +5686,8 @@ The minimum value for this variable is 4096.",
"Persistent buffer for query parsing and execution", "Persistent buffer for query parsing and execution",
(gptr*) &global_system_variables.query_prealloc_size, (gptr*) &global_system_variables.query_prealloc_size,
(gptr*) &max_system_variables.query_prealloc_size, 0, GET_ULONG, (gptr*) &max_system_variables.query_prealloc_size, 0, GET_ULONG,
REQUIRED_ARG, QUERY_ALLOC_PREALLOC_SIZE, 16384, ~0L, 0, 1024, 0}, REQUIRED_ARG, QUERY_ALLOC_PREALLOC_SIZE, QUERY_ALLOC_PREALLOC_SIZE,
~0L, 0, 1024, 0},
{"range_alloc_block_size", OPT_RANGE_ALLOC_BLOCK_SIZE, {"range_alloc_block_size", OPT_RANGE_ALLOC_BLOCK_SIZE,
"Allocation block size for storing ranges during optimization", "Allocation block size for storing ranges during optimization",
(gptr*) &global_system_variables.range_alloc_block_size, (gptr*) &global_system_variables.range_alloc_block_size,
......
...@@ -194,6 +194,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) ...@@ -194,6 +194,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
my_bool return_val= 1; my_bool return_val= 1;
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE; bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
char tmp_name[NAME_LEN+1]; char tmp_name[NAME_LEN+1];
int password_length;
DBUG_ENTER("acl_load"); DBUG_ENTER("acl_load");
grant_version++; /* Privileges updated */ grant_version++; /* Privileges updated */
...@@ -250,7 +251,9 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) ...@@ -250,7 +251,9 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
init_read_record(&read_record_info,thd,table=tables[1].table,NULL,1,0); init_read_record(&read_record_info,thd,table=tables[1].table,NULL,1,0);
VOID(my_init_dynamic_array(&acl_users,sizeof(ACL_USER),50,100)); VOID(my_init_dynamic_array(&acl_users,sizeof(ACL_USER),50,100));
if (table->field[2]->field_length < SCRAMBLED_PASSWORD_CHAR_LENGTH_323) password_length= table->field[2]->field_length /
table->field[2]->charset()->mbmaxlen;
if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
{ {
sql_print_error("Fatal error: mysql.user table is damaged or in " sql_print_error("Fatal error: mysql.user table is damaged or in "
"unsupported 3.20 format."); "unsupported 3.20 format.");
...@@ -258,10 +261,10 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) ...@@ -258,10 +261,10 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
} }
DBUG_PRINT("info",("user table fields: %d, password length: %d", DBUG_PRINT("info",("user table fields: %d, password length: %d",
table->s->fields, table->field[2]->field_length)); table->s->fields, password_length));
pthread_mutex_lock(&LOCK_global_system_variables); pthread_mutex_lock(&LOCK_global_system_variables);
if (table->field[2]->field_length < SCRAMBLED_PASSWORD_CHAR_LENGTH) if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH)
{ {
if (opt_secure_auth) if (opt_secure_auth)
{ {
......
...@@ -904,7 +904,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), ...@@ -904,7 +904,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
while (long_val != 0) while (long_val != 0)
{ {
long quo= long_val/10; long quo= long_val/10;
*--p = '0' + (char)(long_val - quo*10); *--p = (char) ('0' + (long_val - quo*10));
long_val= quo; long_val= quo;
} }
......
...@@ -1063,7 +1063,7 @@ int my_ll10tostr_ucs2(CHARSET_INFO *cs __attribute__((unused)), ...@@ -1063,7 +1063,7 @@ int my_ll10tostr_ucs2(CHARSET_INFO *cs __attribute__((unused)),
while (long_val != 0) while (long_val != 0)
{ {
long quo= long_val/10; long quo= long_val/10;
*--p = '0' + (char)(long_val - quo*10); *--p = (char) ('0' + (long_val - quo*10));
long_val= quo; long_val= quo;
} }
......
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