diff options
author | unknown <jimw@mysql.com> | 2005-10-19 13:47:05 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-10-19 13:47:05 -0700 |
commit | 3d53c870d379e86cdfe3498cde843258fad52bb5 (patch) | |
tree | 29e3c2a30ecd5f46627b4a7cc9b9b1d97a73be7a | |
parent | f8bfae6b8765e1219403b6dba720d10b49f9a223 (diff) | |
parent | c3ac502ab16db7118c4b1f2a70a300e6bd40af85 (diff) | |
download | mariadb-git-3d53c870d379e86cdfe3498cde843258fad52bb5.tar.gz |
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/my_manage.c:
Auto merged
mysql-test/mysql_test_run_new.c:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysqld.cc:
Auto merged
mysql-test/r/variables.result:
Resolve conflicts
mysql-test/t/variables.test:
Resolve conflicts
sql/sql_acl.cc:
Resolve conflicts
strings/ctype-simple.c:
Resolve conflicts
strings/ctype-ucs2.c:
Resolve conflicts
-rw-r--r-- | mysql-test/my_manage.c | 5 | ||||
-rw-r--r-- | mysql-test/mysql_test_run_new.c | 1 | ||||
-rw-r--r-- | mysql-test/r/variables.result | 11 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 24 | ||||
-rw-r--r-- | sql/item_func.cc | 1 | ||||
-rw-r--r-- | sql/mysqld.cc | 3 | ||||
-rw-r--r-- | sql/sql_acl.cc | 9 | ||||
-rw-r--r-- | strings/ctype-simple.c | 2 | ||||
-rw-r--r-- | strings/ctype-ucs2.c | 2 |
9 files changed, 39 insertions, 19 deletions
diff --git a/mysql-test/my_manage.c b/mysql-test/my_manage.c index 88e68dfc27e..919d3bd0529 100644 --- a/mysql-test/my_manage.c +++ b/mysql-test/my_manage.c @@ -230,7 +230,10 @@ int wait_for_server_start(char *bin_dir __attribute__((unused)), char *user, char *password, int port,char *tmp_dir) { arg_list_t al; - int err= 0, i; + int err= 0; +#ifndef __WIN__ + int i; +#endif char trash[FN_REFLEN]; /* mysqladmin file */ diff --git a/mysql-test/mysql_test_run_new.c b/mysql-test/mysql_test_run_new.c index b23b7ceb6a1..33a69eba872 100644 --- a/mysql-test/mysql_test_run_new.c +++ b/mysql-test/mysql_test_run_new.c @@ -1741,7 +1741,6 @@ int main(int argc, char **argv) int* handle; char test[FN_LEN]; char mask[FN_REFLEN]; - char *p; int position; /* single test */ diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 30ebeb462df..3ecc48620b1 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -518,6 +518,14 @@ select ifnull(@@character_set_results,"really null"); ifnull(@@character_set_results,"really null") really null 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); select a into @x from t1; Warnings: @@ -542,9 +550,6 @@ set @@max_heap_table_size= 4294967296; select @@max_heap_table_size > 0; @@max_heap_table_size > 0 1 -select @@have_innodb; -@@have_innodb -# select @@character_set_system; @@character_set_system utf8 diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index afd0fe23805..f23cc0152c1 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -398,6 +398,21 @@ set character_set_results=NULL; select ifnull(@@character_set_results,"really null"); 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 # @@ -430,13 +445,6 @@ set @@max_heap_table_size= 4294967296; 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) # select @@character_set_system; @@ -444,3 +452,5 @@ select @@character_set_system; set global character_set_system = latin1; --error 1238 set @@global.version_compile_os='234'; + +# End of 5.0 tests diff --git a/sql/item_func.cc b/sql/item_func.cc index 491243e9de7..35ed9b615f2 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4503,7 +4503,6 @@ Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name, LEX_STRING component) { sys_var *var; - char buff[MAX_SYS_VAR_LENGTH*2+4+8], *pos; LEX_STRING *base_name, *component_name; if (component.str == 0 && diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9e1fa4bb5ee..e51eb481767 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5686,7 +5686,8 @@ The minimum value for this variable is 4096.", "Persistent buffer for query parsing and execution", (gptr*) &global_system_variables.query_prealloc_size, (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, "Allocation block size for storing ranges during optimization", (gptr*) &global_system_variables.range_alloc_block_size, diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index b28c3be0167..0691708f19b 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -194,6 +194,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) my_bool return_val= 1; bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE; char tmp_name[NAME_LEN+1]; + int password_length; DBUG_ENTER("acl_load"); grant_version++; /* Privileges updated */ @@ -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); 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 " "unsupported 3.20 format."); @@ -258,10 +261,10 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) } 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); - if (table->field[2]->field_length < SCRAMBLED_PASSWORD_CHAR_LENGTH) + if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH) { if (opt_secure_auth) { diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index f6ac740730b..d6f2f0e5fe5 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -904,7 +904,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), while (long_val != 0) { long quo= long_val/10; - *--p = '0' + (char)(long_val - quo*10); + *--p = (char) ('0' + (long_val - quo*10)); long_val= quo; } diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index b0d882d3943..80a7bd84601 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1063,7 +1063,7 @@ int my_ll10tostr_ucs2(CHARSET_INFO *cs __attribute__((unused)), while (long_val != 0) { long quo= long_val/10; - *--p = '0' + (char)(long_val - quo*10); + *--p = (char) ('0' + (long_val - quo*10)); long_val= quo; } |