summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2004-05-25 02:03:49 +0400
committerkonstantin@mysql.com <>2004-05-25 02:03:49 +0400
commitf207b33a7b85f03221fcec1afb662ede70b5e438 (patch)
tree39de3845fc8340f9a27f30803b9104e416c7ab62 /include
parent1b61cb6d0f5dbea8c3901f509b2f99b4d8c618f4 (diff)
downloadmariadb-git-f207b33a7b85f03221fcec1afb662ede70b5e438.tar.gz
Support for character set conversion in binary protocol: another go
after Monty's review. - Item_param was rewritten. - it turns out that we can't convert string data to character set of connection on the fly, because they first should be written to the binary log. To support efficient conversion we need to rewrite prepared statements binlogging code first.
Diffstat (limited to 'include')
-rw-r--r--include/my_global.h2
-rw-r--r--include/my_sys.h2
-rw-r--r--include/mysql_com.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/include/my_global.h b/include/my_global.h
index e7d924eb0ca..6916ea61e19 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -382,7 +382,7 @@ typedef unsigned short ushort;
#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
-#define swap(t,a,b) { register t dummy; dummy = a; a = b; b = dummy; }
+#define swap_variables(t, a, b) { register t dummy; dummy= a; a= b; b= dummy; }
#define test(a) ((a) ? 1 : 0)
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
diff --git a/include/my_sys.h b/include/my_sys.h
index 8beaa00eb16..922e6d8cff4 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -762,6 +762,8 @@ extern char *get_charsets_dir(char *buf);
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
extern my_bool init_compiled_charsets(myf flags);
extern void add_compiled_collation(CHARSET_INFO *cs);
+extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info, char *to,
+ const char *from, ulong length);
#ifdef __WIN__
extern my_bool have_tcpip; /* Is set if tcpip is used */
diff --git a/include/mysql_com.h b/include/mysql_com.h
index ada2bd1f679..a1da896af38 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -359,6 +359,6 @@ char *net_store_length(char *pkg, ulonglong length);
#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
#define MYSQL_STMT_HEADER 4
-#define MYSQL_LONG_DATA_HEADER 6
+#define MYSQL_LONG_DATA_HEADER 6
#endif