summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-09-15 15:24:56 +0300
committerunknown <monty@hundin.mysql.fi>2001-09-15 15:24:56 +0300
commit1a9bf29e9956ccd113d87f8ffe82781d6515ff61 (patch)
treeab4e03c4854b65e0c557a84b43f16c9f5928a876 /sql
parentc97fb8f37a48340af4d69e170682f4e2f843d771 (diff)
downloadmariadb-git-1a9bf29e9956ccd113d87f8ffe82781d6515ff61.tar.gz
Fixed bug in --safe-create-user
Docs/manual.texi: Changelog isam/_dbug.c: Cleanup sql/mysqld.cc: Cleanup sql/net_serv.cc: Cleanup
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc8
-rw-r--r--sql/net_serv.cc1
-rw-r--r--sql/sql_acl.cc6
3 files changed, 8 insertions, 7 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 9aa56ea7fc1..ee72bdb1c3b 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2811,13 +2811,13 @@ CHANGEABLE_VAR changeable_vars[] = {
0, 1, ~0L, 0, 1 },
{ "max_write_lock_count", (long*) &max_write_lock_count,
~0L, 1, ~0L, 0, 1 },
- { "myisam_sort_buffer_size", (long*) &myisam_sort_buffer_size,
- 8192*1024, 4, ~0L, 0, 1 },
{ "myisam_max_extra_sort_file_size",
(long*) &myisam_max_extra_sort_file_size,
(long) (MI_MAX_TEMP_LENGTH/(1024L*1024L)), 0, ~0L, 0, 1 },
{ "myisam_max_sort_file_size", (long*) &myisam_max_sort_file_size,
(long) (LONG_MAX/(1024L*1024L)), 0, ~0L, 0, 1 },
+ { "myisam_sort_buffer_size", (long*) &myisam_sort_buffer_size,
+ 8192*1024, 4, ~0L, 0, 1 },
{ "net_buffer_length", (long*) &net_buffer_length,
16384, 1024, 1024*1024L, MALLOC_OVERHEAD, 1024 },
{ "net_retry_count", (long*) &mysqld_net_retry_count,
@@ -2896,7 +2896,7 @@ struct show_var_st init_vars[]= {
{"have_innodb", (char*) &have_innodb, SHOW_HAVE},
{"have_isam", (char*) &have_isam, SHOW_HAVE},
{"have_raid", (char*) &have_raid, SHOW_HAVE},
- {"have_ssl", (char*) &have_ssl, SHOW_HAVE},
+ {"have_openssl", (char*) &have_ssl, SHOW_HAVE},
{"init_file", (char*) &opt_init_file, SHOW_CHAR_PTR},
#ifdef HAVE_INNOBASE_DB
{"innodb_data_file_path", (char*) &innobase_data_file_path, SHOW_CHAR_PTR},
@@ -2935,10 +2935,10 @@ struct show_var_st init_vars[]= {
{"max_user_connections", (char*) &max_user_connections, SHOW_LONG},
{"max_tmp_tables", (char*) &max_tmp_tables, SHOW_LONG},
{"max_write_lock_count", (char*) &max_write_lock_count, SHOW_LONG},
- {"myisam_recover_options", (char*) &myisam_recover_options, SHOW_LONG},
{"myisam_max_extra_sort_file_size", (char*) &myisam_max_extra_sort_file_size,
SHOW_LONG},
{"myisam_max_sort_file_size",(char*) &myisam_max_sort_file_size, SHOW_LONG},
+ {"myisam_recover_options", (char*) &myisam_recover_options, SHOW_LONG},
{"myisam_sort_buffer_size", (char*) &myisam_sort_buffer_size, SHOW_LONG},
{"net_buffer_length", (char*) &net_buffer_length, SHOW_LONG},
{"net_read_timeout", (char*) &net_read_timeout, SHOW_LONG},
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 4d4603ed586..750079b39a5 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -34,7 +34,6 @@
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
-#include <violite.h>
#ifdef MYSQL_SERVER
ulong max_allowed_packet=65536;
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 798cd78cab1..835b873aee6 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1613,6 +1613,7 @@ int mysql_table_grant (THD *thd, TABLE_LIST *table_list,
List_iterator <LEX_USER> str_list (user_list);
LEX_USER *Str;
TABLE_LIST tables[3];
+ bool create_new_users=0;
DBUG_ENTER("mysql_table_grant");
if (!initialized)
@@ -1680,6 +1681,8 @@ int mysql_table_grant (THD *thd, TABLE_LIST *table_list,
DBUG_RETURN(-1); /* purecov: deadcode */
}
+ if (!revoke_grant)
+ create_new_users= test_if_create_new_users(thd);
int result=0;
pthread_mutex_lock(&LOCK_grant);
MEM_ROOT *old_root=my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC);
@@ -1705,8 +1708,7 @@ int mysql_table_grant (THD *thd, TABLE_LIST *table_list,
*Str,
0,
revoke_grant ? 'N' : 'Y',
- (revoke_grant ? 0 :
- test_if_create_new_users(thd))))
+ create_new_users))
{
result= -1; // Remember error
continue; // Add next user