summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-20 10:26:49 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-20 10:41:32 +0200
commit514b305dfb2839c619a623bbdae5f21cf0077672 (patch)
tree2f9700f05ccf0ddc7e46a547d9a191404e8dbbd7 /client
parentde51acd03730311505677eb7212756e7126183b3 (diff)
parent117291db8b35ddb4cd8c89ee4d8de888160b7163 (diff)
downloadmariadb-git-514b305dfb2839c619a623bbdae5f21cf0077672.tar.gz
Merge 10.3 into 10.4
The MDEV-17262 commit 26432e49d37a37d09b862bb49a021e44bdf4789c was skipped. In Galera 4, the implementation would seem to require changes to the streaming replication. In the tests archive.rnd_pos main.profiling, disable_ps_protocol for SHOW STATUS and SHOW PROFILE commands until MDEV-18974 has been fixed.
Diffstat (limited to 'client')
-rw-r--r--client/mysqlbinlog.cc23
-rw-r--r--client/mysqlcheck.c3
-rw-r--r--client/mysqltest.cc60
3 files changed, 69 insertions, 17 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 114e7e8d38e..ff8566e6953 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -3215,17 +3215,24 @@ err:
DBUG_RETURN(retval == ERROR_STOP ? 1 : 0);
}
+uint e_key_get_latest_version_func(uint) { return 1; }
+uint e_key_get_func(uint, uint, uchar*, uint*) { return 1; }
+uint e_ctx_size_func(uint, uint) { return 1; }
+int e_ctx_init_func(void *, const uchar*, uint, const uchar*, uint,
+ int, uint, uint) { return 1; }
+int e_ctx_update_func(void *, const uchar*, uint, uchar*, uint*) { return 1; }
+int e_ctx_finish_func(void *, uchar*, uint*) { return 1; }
+uint e_encrypted_length_func(uint, uint, uint) { return 1; }
-uint dummy1() { return 1; }
struct encryption_service_st encryption_handler=
{
- (uint(*)(uint))dummy1,
- (uint(*)(uint, uint, uchar*, uint*))dummy1,
- (uint(*)(uint, uint))dummy1,
- (int (*)(void*, const uchar*, uint, const uchar*, uint, int, uint, uint))dummy1,
- (int (*)(void*, const uchar*, uint, uchar*, uint*))dummy1,
- (int (*)(void*, uchar*, uint*))dummy1,
- (uint (*)(uint, uint, uint))dummy1
+ e_key_get_latest_version_func,
+ e_key_get_func,
+ e_ctx_size_func,
+ e_ctx_init_func,
+ e_ctx_update_func,
+ e_ctx_finish_func,
+ e_encrypted_length_func
};
/*
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 432c7abcbe1..e4ab18d52c4 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -962,7 +962,8 @@ static int handle_request_for_tables(char *tables, size_t length,
puts(query);
if (mysql_real_query(sock, query, (ulong)query_length))
{
- sprintf(message, "when executing '%s%s... %s'", op, tab_view, options);
+ my_snprintf(message, sizeof(message), "when executing '%s%s... %s'",
+ op, tab_view, options);
DBerror(sock, message);
my_free(query);
DBUG_RETURN(1);
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index ca15e5e2808..80d4d70be2c 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -8267,6 +8267,12 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
DBUG_ENTER("run_query_stmt");
DBUG_PRINT("query", ("'%-.60s'", query));
+ if (!mysql)
+ {
+ handle_no_active_connection(command, cn, ds);
+ DBUG_VOID_RETURN;
+ }
+
/*
Init a new stmt if it's not already one created for this connection
*/
@@ -8804,18 +8810,56 @@ void init_re(void)
*/
const char *ps_re_str =
"^("
- "[[:space:]]*REPLACE[[:space:]]|"
- "[[:space:]]*INSERT[[:space:]]|"
- "[[:space:]]*UPDATE[[:space:]]|"
- "[[:space:]]*DELETE[[:space:]]|"
- "[[:space:]]*SELECT[[:space:]]|"
+ "[[:space:]]*ALTER[[:space:]]+SEQUENCE[[:space:]]|"
+ "[[:space:]]*ALTER[[:space:]]+TABLE[[:space:]]|"
+ "[[:space:]]*ALTER[[:space:]]+USER[[:space:]]|"
+ "[[:space:]]*ANALYZE[[:space:]]|"
+ "[[:space:]]*ASSIGN[[:space:]]|"
+ //"[[:space:]]*CALL[[:space:]]|" // XXX run_query_stmt doesn't read multiple result sets
+ "[[:space:]]*CHANGE[[:space:]]|"
+ "[[:space:]]*CHECKSUM[[:space:]]|"
+ "[[:space:]]*COMMIT[[:space:]]|"
+ "[[:space:]]*COMPOUND[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+DATABASE[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+INDEX[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+ROLE[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+SEQUENCE[[:space:]]|"
"[[:space:]]*CREATE[[:space:]]+TABLE[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+USER[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+VIEW[[:space:]]|"
+ "[[:space:]]*DELETE[[:space:]]|"
"[[:space:]]*DO[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+DATABASE[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+INDEX[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+ROLE[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+SEQUENCE[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+TABLE[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+USER[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+VIEW[[:space:]]|"
+ "[[:space:]]*FLUSH[[:space:]]|"
+ "[[:space:]]*GRANT[[:space:]]|"
"[[:space:]]*HANDLER[[:space:]]+.*[[:space:]]+READ[[:space:]]|"
+ "[[:space:]]*INSERT[[:space:]]|"
+ "[[:space:]]*INSTALL[[:space:]]+|"
+ "[[:space:]]*KILL[[:space:]]|"
+ "[[:space:]]*OPTIMIZE[[:space:]]|"
+ "[[:space:]]*PRELOAD[[:space:]]|"
+ "[[:space:]]*RENAME[[:space:]]+TABLE[[:space:]]|"
+ "[[:space:]]*RENAME[[:space:]]+USER[[:space:]]|"
+ "[[:space:]]*REPAIR[[:space:]]|"
+ "[[:space:]]*REPLACE[[:space:]]|"
+ "[[:space:]]*RESET[[:space:]]|"
+ "[[:space:]]*REVOKE[[:space:]]|"
+ "[[:space:]]*ROLLBACK[[:space:]]|"
+ "[[:space:]]*SELECT[[:space:]]|"
"[[:space:]]*SET[[:space:]]+OPTION[[:space:]]|"
- "[[:space:]]*DELETE[[:space:]]+MULTI[[:space:]]|"
- "[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|"
- "[[:space:]]*INSERT[[:space:]]+SELECT[[:space:]])";
+ "[[:space:]]*SHOW[[:space:]]|"
+ "[[:space:]]*SHUTDOWN[[:space:]]|"
+ "[[:space:]]*SLAVE[[:space:]]|"
+ "[[:space:]]*TRUNCATE[[:space:]]|"
+ "[[:space:]]*UNINSTALL[[:space:]]+|"
+ "[[:space:]]*UPDATE[[:space:]]"
+ ")";
/*
Filter for queries that can be run using the