summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mysqld_error.h2
-rw-r--r--mysql-test/r/order_by.result56
-rw-r--r--sql/Makefile.am4
-rw-r--r--sql/mysql_priv.h7
-rw-r--r--sql/mysqld.cc7
-rw-r--r--sql/share/czech/errmsg.txt1
-rw-r--r--sql/share/danish/errmsg.txt1
-rw-r--r--sql/share/dutch/errmsg.txt1
-rw-r--r--sql/share/english/errmsg.txt1
-rw-r--r--sql/share/estonian/errmsg.txt1
-rw-r--r--sql/share/french/errmsg.txt1
-rw-r--r--sql/share/german/errmsg.txt1
-rw-r--r--sql/share/greek/errmsg.txt1
-rw-r--r--sql/share/hungarian/errmsg.txt1
-rw-r--r--sql/share/italian/errmsg.txt1
-rw-r--r--sql/share/japanese/errmsg.txt1
-rw-r--r--sql/share/korean/errmsg.txt1
-rw-r--r--sql/share/norwegian-ny/errmsg.txt1
-rw-r--r--sql/share/norwegian/errmsg.txt1
-rw-r--r--sql/share/polish/errmsg.txt1
-rw-r--r--sql/share/portuguese/errmsg.txt1
-rw-r--r--sql/share/romanian/errmsg.txt1
-rw-r--r--sql/share/russian/errmsg.txt1
-rw-r--r--sql/share/slovak/errmsg.txt1
-rw-r--r--sql/share/spanish/errmsg.txt1
-rw-r--r--sql/share/swedish/errmsg.txt1
-rw-r--r--sql/sql_acl.cc4
27 files changed, 65 insertions, 36 deletions
diff --git a/include/mysqld_error.h b/include/mysqld_error.h
index d8b38d96e18..ed2965c51b2 100644
--- a/include/mysqld_error.h
+++ b/include/mysqld_error.h
@@ -216,5 +216,5 @@
#define ER_ERROR_WHEN_EXECUTING_COMMAND 1213
#define ER_WRONG_USAGE 1214
#define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1215
-#define ER_NO_PERSMISSION_TO_CREATE_USER 1216
+#define ER_NO_PERMISSION_TO_CREATE_USER 1216
#define ER_ERROR_MESSAGES 217
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 79b70ac2cc9..f6fc3b6090a 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -111,31 +111,6 @@ DateOfAction TransactionID
member_id nickname voornaam
1
2
-gid sid uid
-104620 5 15
-103867 5 27
-103962 5 27
-104619 5 75
-104505 5 117
-103853 5 250
-gid sid uid
-104620 5 15
-103867 5 27
-103962 5 27
-104619 5 75
-104505 5 117
-103853 5 250
-table type possible_keys key key_len ref rows Extra
-t1 index PRIMARY PRIMARY 4 NULL 6 Using index
-t2 eq_ref PRIMARY,uid PRIMARY 4 t1.gid 1
-t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 where used; Using index
-table type possible_keys key key_len ref rows Extra
-t1 index PRIMARY PRIMARY 4 NULL 6 Using index
-t3 eq_ref PRIMARY PRIMARY 2 t1.gid 1 where used
-table type possible_keys key key_len ref rows Extra
-t1 index PRIMARY PRIMARY 4 NULL 6 Using index; Using temporary; Using filesort
-t2 eq_ref PRIMARY,uid PRIMARY 4 t1.gid 1
-t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 where used; Using index
table type possible_keys key key_len ref rows Extra
t1 range a a 20 NULL 2 where used; Using index
a b c
@@ -252,3 +227,34 @@ a b c
1 1
1 0 b
1 0
+gid sid uid
+104620 5 15
+103867 5 27
+103962 5 27
+104619 5 75
+104505 5 117
+103853 5 250
+gid sid uid
+104620 5 15
+103867 5 27
+103962 5 27
+104619 5 75
+104505 5 117
+103853 5 250
+table type possible_keys key key_len ref rows Extra
+t1 index PRIMARY PRIMARY 4 NULL 6 Using index
+t2 eq_ref PRIMARY,uid PRIMARY 4 t1.gid 1
+t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 where used; Using index
+table type possible_keys key key_len ref rows Extra
+t1 index PRIMARY PRIMARY 4 NULL 6 Using index
+t3 eq_ref PRIMARY PRIMARY 2 t1.gid 1 where used
+table type possible_keys key key_len ref rows Extra
+t1 index PRIMARY PRIMARY 4 NULL 6 Using index; Using temporary; Using filesort
+t2 eq_ref PRIMARY,uid PRIMARY 4 t1.gid 1
+t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 where used; Using index
+table type possible_keys key key_len ref rows Extra
+t1 index PRIMARY PRIMARY 4 NULL 6 Using index; Using temporary; Using filesort
+t3 eq_ref PRIMARY PRIMARY 2 t1.gid 1 where used
+table type possible_keys key key_len ref rows Extra
+t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
+t3 eq_ref PRIMARY PRIMARY 2 t1.skr 1 where used
diff --git a/sql/Makefile.am b/sql/Makefile.am
index d3c3ff541fd..3456a07977d 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -80,9 +80,9 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc \
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \
- slave.cc sql_repl.cc \
+ slave.cc sql_repl.cc sql_union.cc \
mini_client.cc mini_client_errors.c \
- md5.c stacktrace.c
+ md5.c stacktrace.c
gen_lex_hash_SOURCES = gen_lex_hash.cc
gen_lex_hash_LDADD = $(LDADD) $(CXXLDFLAGS)
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 6326e3d07c2..63fe65f5251 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -555,13 +555,14 @@ extern ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
max_insert_delayed_threads, max_user_connections,
long_query_count,net_wait_timeout,net_interactive_timeout,
net_read_timeout,net_write_timeout,
- what_to_log,flush_time,
+ what_to_log,flush_time,opt_sql_mode,
max_tmp_tables,max_heap_table_size,query_buff_size,
lower_case_table_names,thread_stack,thread_stack_min,
- binlog_cache_size, max_binlog_cache_size;
+ binlog_cache_size, max_binlog_cache_size,record_rnd_cache_size;
extern ulong specialflag, current_pid;
extern bool low_priority_updates, using_update_log;
-extern bool opt_sql_bin_update, opt_safe_show_db, opt_warnings;
+extern bool opt_sql_bin_update, opt_safe_show_db, opt_warnings,
+ opt_safe_user_create;
extern char language[LIBLEN],reg_ext[FN_EXTLEN],blob_newline;
extern const char **errmesg; /* Error messages */
extern const char *default_tx_isolation_name;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 4d5ea1d1354..77ee1890a42 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -223,7 +223,8 @@ static bool opt_log,opt_update_log,opt_bin_log,opt_slow_log,opt_noacl,
opt_myisam_log=0,
opt_large_files=sizeof(my_off_t) > 4;
bool opt_sql_bin_update = 0, opt_log_slave_updates = 0, opt_safe_show_db=0,
- opt_show_slave_auth_info = 0, opt_old_rpl_compat = 0;
+ opt_show_slave_auth_info = 0, opt_old_rpl_compat = 0,
+ opt_safe_user_create = 0;
FILE *bootstrap_file=0;
int segfaulted = 0; // ensure we do not enter SIGSEGV handler twice
extern MASTER_INFO glob_mi;
@@ -271,7 +272,7 @@ ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
query_buff_size, lower_case_table_names, mysqld_net_retry_count,
net_interactive_timeout, slow_launch_time = 2L,
net_read_timeout,net_write_timeout,slave_open_temp_tables=0,
- open_files_limit=0, max_binlog_size;
+ open_files_limit=0, max_binlog_size, record_rnd_cache_size;
ulong slave_net_timeout;
ulong thread_cache_size=0, binlog_cache_size=0, max_binlog_cache_size=0;
volatile ulong cached_thread_count=0;
@@ -2531,7 +2532,7 @@ enum options {
OPT_REPORT_USER, OPT_REPORT_PASSWORD, OPT_REPORT_PORT,
OPT_MAX_BINLOG_DUMP_EVENTS, OPT_SPORADIC_BINLOG_DUMP_FAIL,
OPT_SHOW_SLAVE_AUTH_INFO, OPT_OLD_RPL_COMPAT,
- OPT_SQL_MODE,
+ OPT_SQL_MODE,OPT_SAFE_USER_CREATE,
OPT_SLAVE_LOAD_TMPDIR};
static struct option long_options[] = {
diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt
index d4b09dcd981..4f15b56a195 100644
--- a/sql/share/czech/errmsg.txt
+++ b/sql/share/czech/errmsg.txt
@@ -226,3 +226,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt
index 59dfa0b0f32..aa4cb565950 100644
--- a/sql/share/danish/errmsg.txt
+++ b/sql/share/danish/errmsg.txt
@@ -220,3 +220,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt
index 67f95100527..33e2b78bef6 100644
--- a/sql/share/dutch/errmsg.txt
+++ b/sql/share/dutch/errmsg.txt
@@ -217,3 +217,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt
index 8704a3839ac..61c983eefbf 100644
--- a/sql/share/english/errmsg.txt
+++ b/sql/share/english/errmsg.txt
@@ -217,3 +217,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt
index 584bae5c78d..2fecbf38f12 100644
--- a/sql/share/estonian/errmsg.txt
+++ b/sql/share/estonian/errmsg.txt
@@ -221,3 +221,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt
index 31c08d97b1d..0444dec8909 100644
--- a/sql/share/french/errmsg.txt
+++ b/sql/share/french/errmsg.txt
@@ -217,3 +217,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt
index df4dce129c0..b0eb4ae1d98 100644
--- a/sql/share/german/errmsg.txt
+++ b/sql/share/german/errmsg.txt
@@ -220,3 +220,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt
index bfe8ecdfe53..0188d0a6773 100644
--- a/sql/share/greek/errmsg.txt
+++ b/sql/share/greek/errmsg.txt
@@ -217,3 +217,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt
index c44b9a28c42..14aea20fa9b 100644
--- a/sql/share/hungarian/errmsg.txt
+++ b/sql/share/hungarian/errmsg.txt
@@ -219,3 +219,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt
index 732573c3f6c..07ffca9b18d 100644
--- a/sql/share/italian/errmsg.txt
+++ b/sql/share/italian/errmsg.txt
@@ -217,3 +217,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt
index b4d0d551bcf..098edc3312f 100644
--- a/sql/share/japanese/errmsg.txt
+++ b/sql/share/japanese/errmsg.txt
@@ -219,3 +219,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt
index 60a3e28185b..19b0a275b85 100644
--- a/sql/share/korean/errmsg.txt
+++ b/sql/share/korean/errmsg.txt
@@ -217,3 +217,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt
index 9f64e8b9e49..8067cb51897 100644
--- a/sql/share/norwegian-ny/errmsg.txt
+++ b/sql/share/norwegian-ny/errmsg.txt
@@ -219,3 +219,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt
index 64806f4bd1c..67260f3aa77 100644
--- a/sql/share/norwegian/errmsg.txt
+++ b/sql/share/norwegian/errmsg.txt
@@ -219,3 +219,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt
index 34a4231b3a9..aa550701621 100644
--- a/sql/share/polish/errmsg.txt
+++ b/sql/share/polish/errmsg.txt
@@ -221,3 +221,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt
index 4a755004e0e..6a9334160da 100644
--- a/sql/share/portuguese/errmsg.txt
+++ b/sql/share/portuguese/errmsg.txt
@@ -217,3 +217,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt
index 2877139aa02..01f08be03c8 100644
--- a/sql/share/romanian/errmsg.txt
+++ b/sql/share/romanian/errmsg.txt
@@ -221,3 +221,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt
index abeadcf5f57..75aaca498d2 100644
--- a/sql/share/russian/errmsg.txt
+++ b/sql/share/russian/errmsg.txt
@@ -220,3 +220,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt
index 39435961e51..9ed6391254c 100644
--- a/sql/share/slovak/errmsg.txt
+++ b/sql/share/slovak/errmsg.txt
@@ -225,3 +225,4 @@
"Error when executing command %s: %-.128s",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt
index 67e7304812e..ff00ddd4823 100644
--- a/sql/share/spanish/errmsg.txt
+++ b/sql/share/spanish/errmsg.txt
@@ -218,3 +218,4 @@
"Error de %s: %-128%",
"Wrong usage of %s and %s",
"The used SELECT statements have a different number of columns",
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt
index d74685736dc..180b336c34a 100644
--- a/sql/share/swedish/errmsg.txt
+++ b/sql/share/swedish/errmsg.txt
@@ -217,3 +217,4 @@
"Fick fel vid utförande av %s: %-.128s",
"Felaktig använding av %s and %s",
"SELECT kommandona har olika antal kolumner"
+"%-.32s@%-.64s is not allowed to create new users",
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 86d3f61776c..5fc3d32b817 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1003,8 +1003,8 @@ static int replace_user_table(TABLE *table, const LEX_USER &combo,
my_printf_error(ER_NONEXISTING_GRANT,ER(ER_NONEXISTING_GRANT),
MYF(0),combo.user.str,combo.host.str);
else
- my_printf_error(ER_NO_PERMISSON_TO_CREATE_USER,
- ER(ER_NO_PERMISSON_TO_CREATE_USER),
+ my_printf_error(ER_NO_PERMISSION_TO_CREATE_USER,
+ ER(ER_NO_PERMISSION_TO_CREATE_USER),
MYF(0),thd->user,
thd->host ? thd->host : thd->ip ? thd->ip: "");
error= -1;