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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8a3fb5fb
Commit
8a3fb5fb
authored
Feb 28, 2008
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update $mysql_get_server_version variable with version
of the currently connected server
parent
862c4750
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
client/mysqltest.c
client/mysqltest.c
+22
-0
No files found.
client/mysqltest.c
View file @
8a3fb5fb
...
...
@@ -1902,6 +1902,18 @@ void var_set_errno(int sql_errno)
var_set_int
(
"$mysql_errno"
,
sql_errno
);
}
/*
Update $mysql_get_server_version variable with version
of the currently connected server
*/
void
var_set_mysql_get_server_version
(
MYSQL
*
mysql
)
{
var_set_int
(
"$mysql_get_server_version"
,
mysql_get_server_version
(
mysql
));
}
/*
Set variable from the result of a query
...
...
@@ -4018,6 +4030,10 @@ int select_connection_name(const char *name)
if
(
!
(
cur_con
=
find_connection_by_name
(
name
)))
die
(
"connection '%s' not found in connection pool"
,
name
);
/* Update $mysql_get_server_version to that of current connection */
var_set_mysql_get_server_version
(
&
cur_con
->
mysql
);
DBUG_RETURN
(
0
);
}
...
...
@@ -4409,6 +4425,9 @@ void do_connect(struct st_command *command)
next_con
++
;
/* if we used the next_con slot, advance the pointer */
}
/* Update $mysql_get_server_version to that of current connection */
var_set_mysql_get_server_version
(
&
cur_con
->
mysql
);
dynstr_free
(
&
ds_connection_name
);
dynstr_free
(
&
ds_host
);
dynstr_free
(
&
ds_user
);
...
...
@@ -6924,6 +6943,9 @@ int main(int argc, char **argv)
*/
var_set_errno
(
-
1
);
/* Update $mysql_get_server_version to that of current connection */
var_set_mysql_get_server_version
(
&
cur_con
->
mysql
);
if
(
opt_include
)
{
open_file
(
opt_include
);
...
...
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