Commit 9b208ed1 authored by unknown's avatar unknown

Merge mysql.com:/usr/home/bar/mysql-5.0

into  mysql.com:/usr/home/bar/mysql-5.1-new


libmysql/libmysql.c:
  Auto merged
sql-common/client.c:
  Auto merged
parents c86853e0 a0f7e755
...@@ -1380,35 +1380,6 @@ mysql_get_server_info(MYSQL *mysql) ...@@ -1380,35 +1380,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 const char * STDCALL
mysql_get_host_info(MYSQL *mysql) mysql_get_host_info(MYSQL *mysql)
{ {
......
...@@ -2817,6 +2817,36 @@ const char * STDCALL mysql_error(MYSQL *mysql) ...@@ -2817,6 +2817,36 @@ const char * STDCALL mysql_error(MYSQL *mysql)
return mysql->net.last_error; 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 mysql_set_character_set function sends SET NAMES cs_name to
the server (which changes character_set_client, character_set_result the server (which changes character_set_client, character_set_result
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment