1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-12 01:53:02 +03:00

Field::quote_data():

don't call escape_string_for_mysql() unnecesary
  don't overwrite local buffer
escape_string_for_mysql():
  take a length of the destination buffer as an argument


include/my_sys.h:
  prototype changed
libmysql/libmysql.c:
  prototype changed
mysys/charset.c:
  escape_string_for_mysql():
    take a length of the destination buffer as an argument
sql/field.cc:
  Field::quote_data():
    don't call escape_string_for_mysql() unnecesary
    don't overwrite local buffer
sql/item.cc:
  prototype changed
sql/sql_prepare.cc:
  prototype changed
This commit is contained in:
unknown
2005-03-17 12:27:45 +01:00
parent 278e691ba8
commit b6e29d09b0
6 changed files with 64 additions and 45 deletions

View File

@ -1575,14 +1575,14 @@ mysql_hex_string(char *to, const char *from, ulong length)
ulong STDCALL
mysql_escape_string(char *to,const char *from,ulong length)
{
return escape_string_for_mysql(default_charset_info, to, from, length);
return escape_string_for_mysql(default_charset_info, to, 0, from, length);
}
ulong STDCALL
mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
ulong length)
{
return escape_string_for_mysql(mysql->charset, to, from, length);
return escape_string_for_mysql(mysql->charset, to, 0, from, length);
}