1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixes and code cleanups after merge with 4.0.3

Warning handling and initial prepared statement handling (last not complete yet)
Changed a lot of functions that returned 0/1 to my_bool type.
GRANT handling now uses read/write locks instead of mutex
Change basic net functions to use THD instead of NET
(needed for 4.1 protocol)
Use my_sprintf instead of sprintf() + strlen()
Added alloc_query() to be able to chare query initialization code with
prepared statements.
Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID()

Note that the following test fails (will be fixed ASAP):
sub_select, union, rpl_rotate_logs and rpl_mystery22
This commit is contained in:
monty@mashka.mysql.fi
2002-10-02 13:33:08 +03:00
parent 7134ffec21
commit d69250a969
108 changed files with 3054 additions and 2944 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (C) 2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -23,22 +23,24 @@ int my_strnxfrm_simple(CHARSET_INFO * cs,
char *dest, uint len,
const char *src, uint srclen)
{
uchar *map= cs->sort_order;
DBUG_ASSERT(len >= srclen);
for ( ; len > 0 ; len-- )
*dest++= (char) cs->sort_order[(uchar) *src++];
*dest++= (char) map[(uchar) *src++];
return srclen;
}
int my_strnncoll_simple(CHARSET_INFO * cs,const char *s, uint slen,
const char *t, uint tlen)
int my_strnncoll_simple(CHARSET_INFO * cs, const char *s, uint slen,
const char *t, uint tlen)
{
int len = ( slen > tlen ) ? tlen : slen;
uchar *map= cs->sort_order;
while (len--)
{
if (cs->sort_order[(uchar) *s++] != cs->sort_order[(uchar) *t++])
return ((int) cs->sort_order[(uchar) s[-1]] -
(int) cs->sort_order[(uchar) t[-1]]);
if (map[(uchar) *s++] != map[(uchar) *t++])
return ((int) map[(uchar) s[-1]] -
(int) map[(uchar) t[-1]]);
}
return (int) (slen-tlen);
}