Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8698db63
Commit
8698db63
authored
Aug 08, 2024
by
Yuchen Pei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-34716 [to-squash] 11.6 fixup caused by MDEV-31340
To be squashed with the top MDEV-34716 commit
parent
f65ce2ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
12 deletions
+51
-12
sql/sql_servers.cc
sql/sql_servers.cc
+7
-3
sql/sql_yacc.yy
sql/sql_yacc.yy
+44
-9
No files found.
sql/sql_servers.cc
View file @
8698db63
...
@@ -447,7 +447,9 @@ get_server_from_table_to_cache(TABLE *table)
...
@@ -447,7 +447,9 @@ get_server_from_table_to_cache(TABLE *table)
if
(
vt
!=
JSV_STRING
)
if
(
vt
!=
JSV_STRING
)
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
Lex_cstring
name
=
{
keyname
,
keyname_end
},
value
=
{
v
,
v
+
v_len
};
Lex_cstring
name
=
{
keyname
,
keyname_end
},
value
=
{
v
,
v
+
v_len
};
engine_option_value
*
option
=
new
(
&
mem
)
engine_option_value
(
name
,
value
,
true
);
engine_option_value
*
option
=
new
(
&
mem
)
engine_option_value
(
engine_option_value
::
Name
(
safe_lexcstrdup_root
(
&
mem
,
name
)),
engine_option_value
::
Value
(
safe_lexcstrdup_root
(
&
mem
,
value
)),
true
);
option
->
link
(
&
server
->
option_list
,
&
option_list_last
);
option
->
link
(
&
server
->
option_list
,
&
option_list_last
);
}
}
engine_option_value
*
option
=
server
->
option_list
;
engine_option_value
*
option
=
server
->
option_list
;
...
@@ -1252,8 +1254,10 @@ static void copy_option_list(MEM_ROOT *mem, FOREIGN_SERVER *server,
...
@@ -1252,8 +1254,10 @@ static void copy_option_list(MEM_ROOT *mem, FOREIGN_SERVER *server,
option
=
option
->
next
)
option
=
option
->
next
)
{
{
engine_option_value
*
new_option
=
new
(
mem
)
engine_option_value
(
option
);
engine_option_value
*
new_option
=
new
(
mem
)
engine_option_value
(
option
);
new_option
->
name
=
safe_lexcstrdup_root
(
mem
,
option
->
name
);
new_option
->
name
=
engine_option_value
::
Name
(
new_option
->
value
=
safe_lexcstrdup_root
(
mem
,
option
->
value
);
safe_lexcstrdup_root
(
mem
,
option
->
name
));
new_option
->
value
=
engine_option_value
::
Value
(
safe_lexcstrdup_root
(
mem
,
option
->
value
));
new_option
->
link
(
&
server
->
option_list
,
&
option_list_last
);
new_option
->
link
(
&
server
->
option_list
,
&
option_list_last
);
}
}
}
}
...
...
sql/sql_yacc.yy
View file @
8698db63
...
@@ -2900,7 +2900,11 @@ server_option:
...
@@ -2900,7 +2900,11 @@ server_option:
MYSQL_YYABORT_UNLESS(Lex->server_options.username.str == 0);
MYSQL_YYABORT_UNLESS(Lex->server_options.username.str == 0);
Lex->server_options.username= $2;
Lex->server_options.username= $2;
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, true);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
engine_option_value::Value(
safe_lexcstrdup_root(thd->mem_root, $2)), true);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
...
@@ -2909,7 +2913,11 @@ server_option:
...
@@ -2909,7 +2913,11 @@ server_option:
MYSQL_YYABORT_UNLESS(Lex->server_options.host.str == 0);
MYSQL_YYABORT_UNLESS(Lex->server_options.host.str == 0);
Lex->server_options.host= $2;
Lex->server_options.host= $2;
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, true);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
engine_option_value::Value(
safe_lexcstrdup_root(thd->mem_root, $2)), true);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
...
@@ -2918,7 +2926,11 @@ server_option:
...
@@ -2918,7 +2926,11 @@ server_option:
MYSQL_YYABORT_UNLESS(Lex->server_options.db.str == 0);
MYSQL_YYABORT_UNLESS(Lex->server_options.db.str == 0);
Lex->server_options.db= $2;
Lex->server_options.db= $2;
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, true);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
engine_option_value::Value(
safe_lexcstrdup_root(thd->mem_root, $2)), true);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
...
@@ -2927,7 +2939,11 @@ server_option:
...
@@ -2927,7 +2939,11 @@ server_option:
MYSQL_YYABORT_UNLESS(Lex->server_options.owner.str == 0);
MYSQL_YYABORT_UNLESS(Lex->server_options.owner.str == 0);
Lex->server_options.owner= $2;
Lex->server_options.owner= $2;
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, true);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
engine_option_value::Value(
safe_lexcstrdup_root(thd->mem_root, $2)), true);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
...
@@ -2936,7 +2952,11 @@ server_option:
...
@@ -2936,7 +2952,11 @@ server_option:
MYSQL_YYABORT_UNLESS(Lex->server_options.password.str == 0);
MYSQL_YYABORT_UNLESS(Lex->server_options.password.str == 0);
Lex->server_options.password= $2;
Lex->server_options.password= $2;
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, true);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
engine_option_value::Value(
safe_lexcstrdup_root(thd->mem_root, $2)), true);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
...
@@ -2945,7 +2965,11 @@ server_option:
...
@@ -2945,7 +2965,11 @@ server_option:
MYSQL_YYABORT_UNLESS(Lex->server_options.socket.str == 0);
MYSQL_YYABORT_UNLESS(Lex->server_options.socket.str == 0);
Lex->server_options.socket= $2;
Lex->server_options.socket= $2;
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, true);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
engine_option_value::Value(
safe_lexcstrdup_root(thd->mem_root, $2)), true);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
...
@@ -2953,7 +2977,10 @@ server_option:
...
@@ -2953,7 +2977,10 @@ server_option:
{
{
Lex->server_options.port= $2;
Lex->server_options.port= $2;
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, thd->mem_root);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
$2, thd->mem_root);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
...
@@ -2971,14 +2998,22 @@ server_option:
...
@@ -2971,14 +2998,22 @@ server_option:
}
}
Lex->server_options.port= (long) p;
Lex->server_options.port= (long) p;
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, true);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
engine_option_value::Value(
safe_lexcstrdup_root(thd->mem_root, $2)), true);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
| IDENT_sys TEXT_STRING_sys
| IDENT_sys TEXT_STRING_sys
{
{
engine_option_value *new_option=
engine_option_value *new_option=
new (thd->mem_root) engine_option_value($1, $2, true);
new (thd->mem_root) engine_option_value(
engine_option_value::Name(
safe_lexcstrdup_root(thd->mem_root, $1)),
engine_option_value::Value(
safe_lexcstrdup_root(thd->mem_root, $2)), true);
new_option->link(&Lex->server_options.option_list,
new_option->link(&Lex->server_options.option_list,
&Lex->option_list_last);
&Lex->option_list_last);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment