From 94d1d88658e5aa75d999c308ac464014f20a3d02 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 18 Jun 2005 01:55:42 +0200 Subject: Clean up warnings and build problems on Windows. (Bug #11045) VC++Files/sql/mysqld.dsp: Link debug server against debug yassl sql/examples/ha_archive.cc: Fix type for variables used to store number of rows Add cast when reading current position sql/examples/ha_archive.h: Fix variables used to store rows to ha_rows sql/ha_federated.cc: Remove unused variables, fix type of variable used to store query id sql/item_strfunc.cc: Remove unused variables sql/sql_acl.cc: Remove unused variables sql/sql_lex.cc: Add casts to fix type used for counting number of rows sql/sql_lex.h: Fix size of options to be ulong again sql/sql_insert.cc: Fix type of query id value sql/sql_union.cc: Cast value for number of rows to ha_rows sql/sql_yacc.yy: Remove unused variable sql/table.cc: Add casts for handling key_part lengths --- sql/sql_acl.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'sql/sql_acl.cc') diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 04da0dd5eb5..c9f727f47d4 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2476,7 +2476,6 @@ static int replace_routine_table(THD *thd, GRANT_NAME *grant_name, int old_row_exists= 1; int error=0; ulong store_proc_rights; - byte *key; DBUG_ENTER("replace_routine_table"); if (!initialized) @@ -3216,7 +3215,6 @@ my_bool grant_init(THD *org_thd) do { GRANT_NAME *mem_check; - longlong proc_type; HASH *hash; if (!(mem_check=new GRANT_NAME(p_table))) { -- cgit v1.2.1 From 9e78db81b04cbe271c01a384951ef2f3845027c3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 20 Jun 2005 10:21:35 -0700 Subject: Fix crash when an entry was added to the mysql.tables_priv table with an empty hostname. (Bug #11330) mysql-test/r/grant.result: Update results mysql-test/t/grant.test: Add new regression test sql/sql_acl.cc: Don't call strlen() on a NULL pointer. --- sql/sql_acl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_acl.cc') diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 849192154da..d191da32189 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1866,7 +1866,8 @@ GRANT_TABLE::GRANT_TABLE(TABLE *form, TABLE *col_privs) if (cols) { int key_len; - col_privs->field[0]->store(host.hostname,(uint) strlen(host.hostname), + col_privs->field[0]->store(host.hostname, + host.hostname ? (uint) strlen(host.hostname) : 0, &my_charset_latin1); col_privs->field[1]->store(db,(uint) strlen(db), &my_charset_latin1); col_privs->field[2]->store(user,(uint) strlen(user), &my_charset_latin1); -- cgit v1.2.1