Hi, Sanja! On Mar 06, sanja@mariadb.com wrote:
revision-id: 6c772ae62a0a43ea227f491509c02efb99c5ce92 parent(s): da181fee4ec849985b15a758c6b26058a0f5e318 committer: Oleksandr Byelkin branch nick: server timestamp: 2015-03-06 15:51:51 +0100 message:
MDEV-6956:SET STATEMENT default_master_connection = ... has no effect
the problem was in assigning default value during parsing.
Ok to push, but see below.
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 8025340..8255306 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2445,7 +2445,9 @@ optional_connection_name: /* empty */ { LEX *lex= thd->lex; - lex->mi.connection_name= thd->variables.default_master_connection; + lex->mi.connection_name.str= NullS; + lex->mi.connection_name.length= 0; + //thd->variables.default_master_connection;
you've forgot to remove this commented-out line. and prefer to use null_lex_str: lex->mi.connection_name= null_lex_str; Regards, Sergei