Re: [Maria-developers] 6c772ae: MDEV-6956:SET STATEMENT default_master_connection = ... has no effect
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
Hi, Sergei! On 11.03.15 19:03, Sergei Golubchik wrote: [skip]
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;
IMHO NullS is more reliable special pointer then NULL in this case, because NULL can be assigned in some cleanups & Co.
Regards, Sergei
On 12.03.15 08:38, Oleksandr Byelkin wrote:
Hi, Sergei!
On 11.03.15 19:03, Sergei Golubchik wrote: [skip]
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;
IMHO NullS is more reliable special pointer then NULL in this case, because NULL can be assigned in some cleanups & Co.
OK I was wrong NullS is just NULL.
Regards, Sergei
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
participants (2)
-
Oleksandr Byelkin
-
Sergei Golubchik