maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #01689
Re: bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2777)
I am worried about this. What is the reason?
.
I am no coder (my motto: 'life is too short for coding') so I cannot resolve
the diff, but are there any plans that MariaDB should return a version
string that cannot be handled by a standard MySQL client (due to 'a non
numerical prefix before the version number')? That I would find a very bad
idea .. would break almost any client (GUI clients, PHP, Java connector -
whatever) except for those clients shipped my MariaDB. Could someone please
explain in plain words what this is about and why it is committed? Thanks
in advance ...
.
Peter
Webyog
.
On Thu, Dec 3, 2009 at 16:26, Michael Widenius <monty@xxxxxxxxxxxx> wrote:
> #At lp:maria based on
> revid:monty@xxxxxxxxxxxx-20091203120237-g7oekcuv6emhor1z
>
> 2777 Michael Widenius 2009-12-03
> Ensure that mysql_get_server_version() also works if there is a non
> numerical prefix before the version number
> modified:
> sql-common/client.c
>
> === modified file 'sql-common/client.c'
> --- a/sql-common/client.c 2009-12-03 11:19:05 +0000
> +++ b/sql-common/client.c 2009-12-03 15:26:54 +0000
> @@ -3208,7 +3208,7 @@ const char * STDCALL mysql_error(MYSQL *
> mysql Connection
>
> EXAMPLE
> - 4.1.0-alfa -> 40100
> + MariaDB-4.1.0-alfa -> 40100
>
> NOTES
> We will ensure that a newer server always has a bigger number.
> @@ -3221,7 +3221,11 @@ ulong STDCALL
> mysql_get_server_version(MYSQL *mysql)
> {
> uint major, minor, version;
> - char *pos= mysql->server_version, *end_pos;
> + const char *pos= mysql->server_version;
> + char *end_pos;
> + /* Skip possible prefix */
> + while (*pos && !my_isdigit(&my_charset_latin1, *pos))
> + 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);
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-developers
> Post to : maria-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-developers
> More help : https://help.launchpad.net/ListHelp
>
References