Merge branch '2.2' into develop

This commit is contained in:
Johan Wikman
2018-05-18 13:40:27 +03:00
7 changed files with 29 additions and 11 deletions

View File

@ -2,6 +2,7 @@
"build" :
{
"hostname" : "default",
"memory_size" : "4096",
"box" : "$box"
}
}

View File

@ -3,6 +3,7 @@
{
"hostname" : "maxscale",
"box" : "$box",
"memory_size" : "4096",
"product" : {
"name": "maxscale"
}

View File

@ -1336,8 +1336,8 @@ void Mariadb_nodes::disable_server_setting(int node, const char* setting)
void Mariadb_nodes::add_server_setting(int node, const char* setting)
{
ssh_node_f(node, true, "sudo sed -i '$a [server]' /etc/my.cnf.d/server.cnf", setting);
ssh_node_f(node, true, "sudo sed -i '$a %s' /etc/my.cnf.d/server.cnf", setting);
ssh_node_f(node, true, "sudo sed -i '$a [server]' /etc/my.cnf.d/server*.cnf", setting);
ssh_node_f(node, true, "sudo sed -i '$a %s' /etc/my.cnf.d/server*.cnf", setting);
}
void Mariadb_nodes::reset_server_settings(int node)
@ -1396,7 +1396,9 @@ int Mariadb_nodes::prepare_server(int i)
ssh_node_f(i, true, "%s", stop_db_command[i]);
sleep(5);
ssh_node(i, "sed -i \"s/bind-address/#bind-address/g\" /etc/mysql/my.cnf.d/*.cnf", true);
ssh_node(i, "ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/usr.sbin.mysqld; sudo service apparmor restart", true);
ssh_node(i,
"ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/usr.sbin.mysqld; sudo service apparmor restart",
true);
version = ssh_node_output(i, "/usr/sbin/mysqld --version", false, &ec);
if (ec == 0)
{
@ -1413,7 +1415,8 @@ int Mariadb_nodes::prepare_server(int i)
// password in the log and reseting passord to empty string
ssh_node(i, "/usr/sbin/mysqld --initialize; sudo chown -R mysql:mysql /var/lib/mysql", true);
ssh_node(i, start_db_command[i], true);
tmp_pass = ssh_node_output(i, "cat /var/log/mysqld.log | grep \"temporary password\" | sed -n -e 's/^.*: //p'", true, &ec);
tmp_pass = ssh_node_output(i,
"cat /var/log/mysqld.log | grep \"temporary password\" | sed -n -e 's/^.*: //p'", true, &ec);
ssh_node_f(i, true, "mysqladmin -uroot -p'%s' password '%s'", tmp_pass, tmp_pass);
ssh_node_f(i, false, "echo \"UNINSTALL PLUGIN validate_password\" | sudo mysql -uroot -p'%s'", tmp_pass);
ssh_node(i, stop_db_command[i], true);

View File

@ -1793,6 +1793,7 @@ static void parsing_info_done(void* ptr)
free(field.table);
free(field.column);
}
free(fi.fields);
}
free(pi->function_infos);

View File

@ -629,7 +629,7 @@ columnid(A) ::= nm(X). {
PREVIOUS
QUICK
RAISE RECURSIVE /*REINDEX*/ RELEASE /*RENAME*/ /*REPLACE*/ RESTRICT ROLLBACK ROLLUP ROW
SAVEPOINT SELECT_OPTIONS_KW /*SEQUENCE*/ SLAVE /*START*/ STATUS
SAVEPOINT SELECT_OPTIONS_KW /*SEQUENCE*/ SLAVE /*START*/ STATEMENT STATUS
TABLES TEMP TEMPTABLE /*TRIGGER*/
/*TRUNCATE*/
// TODO: UNSIGNED is a reserved word and should not automatically convert into an identifer.
@ -3157,6 +3157,14 @@ cmd ::= SET set_scope(X) TRANSACTION transaction_characteristics. {
maxscaleSet(pParse, X, MXS_SET_TRANSACTION, 0);
}
cmd ::= SET STATEMENT variable_assignments(X) FOR cmd. {
// The parsing of cmd will cause the relevant maxscale-callback to
// be called, so we neither need to call it here, nor free cmd (as
// it will be freed by that callback). The variable definitions we
// just throw away, as they are of no interest.
sqlite3ExprListDelete(pParse->db, X);
}
//////////////////////// The USE statement ////////////////////////////////////
//
cmd ::= use(X). {

View File

@ -442,6 +442,7 @@ static Keyword aKeywordTable[] = {
{ "SET", "TK_SET", ALWAYS },
#ifdef MAXSCALE
{ "START", "TK_START", ALWAYS },
{ "STATEMENT", "TK_STATEMENT", ALWAYS },
{ "STATUS", "TK_STATUS", ALWAYS },
{ "STRAIGHT_JOIN", "TK_STRAIGHT_JOIN",ALWAYS },
#endif

View File

@ -106,3 +106,6 @@ CALL p1((SELECT f1()), ?);
# MXS-1829
SELECT PREVIOUS VALUE FOR SEQ;
# MXS-1874
SET STATEMENT max_statement_time=30 FOR SELECT seq FROM seq_0_to_100000;