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
13b5cdb1
Commit
13b5cdb1
authored
Apr 06, 2006
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving mysql_get_server_version() from libmysql.c to client.c,
as it is now required by mysql_set_character_set()
parent
14846536
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
29 deletions
+30
-29
libmysql/libmysql.c
libmysql/libmysql.c
+0
-29
sql-common/client.c
sql-common/client.c
+30
-0
No files found.
libmysql/libmysql.c
View file @
13b5cdb1
...
...
@@ -1386,35 +1386,6 @@ mysql_get_server_info(MYSQL *mysql)
}
/*
Get version number for server in a form easy to test on
SYNOPSIS
mysql_get_server_version()
mysql Connection
EXAMPLE
4.1.0-alfa -> 40100
NOTES
We will ensure that a newer server always has a bigger number.
RETURN
Signed number > 323000
*/
ulong
STDCALL
mysql_get_server_version
(
MYSQL
*
mysql
)
{
uint
major
,
minor
,
version
;
char
*
pos
=
mysql
->
server_version
,
*
end_pos
;
major
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
pos
=
end_pos
+
1
;
minor
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
pos
=
end_pos
+
1
;
version
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
return
(
ulong
)
major
*
10000L
+
(
ulong
)
(
minor
*
100
+
version
);
}
const
char
*
STDCALL
mysql_get_host_info
(
MYSQL
*
mysql
)
{
...
...
sql-common/client.c
View file @
13b5cdb1
...
...
@@ -2817,6 +2817,36 @@ const char * STDCALL mysql_error(MYSQL *mysql)
return
mysql
->
net
.
last_error
;
}
/*
Get version number for server in a form easy to test on
SYNOPSIS
mysql_get_server_version()
mysql Connection
EXAMPLE
4.1.0-alfa -> 40100
NOTES
We will ensure that a newer server always has a bigger number.
RETURN
Signed number > 323000
*/
ulong
STDCALL
mysql_get_server_version
(
MYSQL
*
mysql
)
{
uint
major
,
minor
,
version
;
char
*
pos
=
mysql
->
server_version
,
*
end_pos
;
major
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
pos
=
end_pos
+
1
;
minor
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
pos
=
end_pos
+
1
;
version
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
return
(
ulong
)
major
*
10000L
+
(
ulong
)
(
minor
*
100
+
version
);
}
/*
mysql_set_character_set function sends SET NAMES cs_name to
the server (which changes character_set_client, character_set_result
...
...
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