summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <davi@endora.local>2007-11-26 16:10:26 -0200
committerunknown <davi@endora.local>2007-11-26 16:10:26 -0200
commit08e232b9e8bf46d818a8fcb69aecf2b654099747 (patch)
treeebf839c222356a78b498c2584a3282c550e08412 /libmysql
parent1522ef3f21e2ec4d2b0ab0be62fb7aa78a839583 (diff)
parentb8a19c228ce93ff5e57d7d122d8d5a74236670f6 (diff)
downloadmariadb-git-08e232b9e8bf46d818a8fcb69aecf2b654099747.tar.gz
Merge mysql.com:/Users/davi/mysql/bugs/29592-5.0
into mysql.com:/Users/davi/mysql/bugs/29592-5.1 include/mysql.h: Auto merged libmysql/libmysql.c: Auto merged libmysql/libmysql.def: Auto merged libmysqld/libmysqld.def: Auto merged include/mysql_h.ic: Update ABI check file.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c72
-rw-r--r--libmysql/libmysql.def1
2 files changed, 0 insertions, 73 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index cb326fa4685..bf5dd7d63eb 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -1629,78 +1629,6 @@ mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
return escape_string_for_mysql(mysql->charset, to, 0, from, length);
}
-
-char * STDCALL
-mysql_odbc_escape_string(MYSQL *mysql,
- char *to, ulong to_length,
- const char *from, ulong from_length,
- void *param,
- char * (*extend_buffer)
- (void *, char *, ulong *))
-{
- char *to_end=to+to_length-5;
- const char *end;
-#ifdef USE_MB
- my_bool use_mb_flag=use_mb(mysql->charset);
-#endif
-
- for (end=from+from_length; from != end ; from++)
- {
- if (to >= to_end)
- {
- to_length = (ulong) (end-from)+512; /* We want this much more */
- if (!(to=(*extend_buffer)(param, to, &to_length)))
- return to;
- to_end=to+to_length-5;
- }
-#ifdef USE_MB
- {
- int l;
- if (use_mb_flag && (l = my_ismbchar(mysql->charset, from, end)))
- {
- while (l--)
- *to++ = *from++;
- from--;
- continue;
- }
- }
-#endif
- switch (*from) {
- case 0: /* Must be escaped for 'mysql' */
- *to++= '\\';
- *to++= '0';
- break;
- case '\n': /* Must be escaped for logs */
- *to++= '\\';
- *to++= 'n';
- break;
- case '\r':
- *to++= '\\';
- *to++= 'r';
- break;
- case '\\':
- *to++= '\\';
- *to++= '\\';
- break;
- case '\'':
- *to++= '\\';
- *to++= '\'';
- break;
- case '"': /* Better safe than sorry */
- *to++= '\\';
- *to++= '"';
- break;
- case '\032': /* This gives problems on Win32 */
- *to++= '\\';
- *to++= 'Z';
- break;
- default:
- *to++= *from;
- }
- }
- return to;
-}
-
void STDCALL
myodbc_remove_escape(MYSQL *mysql,char *name)
{
diff --git a/libmysql/libmysql.def b/libmysql/libmysql.def
index 8c6b71d9553..81f86dc8726 100644
--- a/libmysql/libmysql.def
+++ b/libmysql/libmysql.def
@@ -78,7 +78,6 @@ EXPORTS
mysql_next_result
mysql_num_fields
mysql_num_rows
- mysql_odbc_escape_string
mysql_options
mysql_stmt_param_count
mysql_stmt_param_metadata