Loading client/mysql.cc +8 −3 Original line number Diff line number Diff line Loading @@ -2509,10 +2509,15 @@ print_table_data_xml(MYSQL_RES *result) { tee_fprintf(PAGER, "\t<field name=\""); xmlencode_print(fields[i].name, (uint) strlen(fields[i].name)); if (cur[i]) { tee_fprintf(PAGER, "\">"); xmlencode_print(cur[i], lengths[i]); tee_fprintf(PAGER, "</field>\n"); } else tee_fprintf(PAGER, "\" xsi:nil=\"true\" />\n"); } (void) tee_fputs(" </row>\n", PAGER); } (void) tee_fputs("</resultset>\n", PAGER); Loading include/m_ctype.h +10 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,9 @@ typedef struct my_charset_handler_st int *err); longlong (*strtoll10)(struct charset_info_st *cs, const char *nptr, char **endptr, int *error); ulonglong (*strntoull10rnd)(struct charset_info_st *cs, const char *str, uint length, int unsigned_fl, char **endptr, int *error); ulong (*scan)(struct charset_info_st *, const char *b, const char *e, int sq); } MY_CHARSET_HANDLER; Loading Loading @@ -341,6 +344,13 @@ longlong my_strtoll10_8bit(CHARSET_INFO *cs, longlong my_strtoll10_ucs2(CHARSET_INFO *cs, const char *nptr, char **endptr, int *error); ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs, const char *str, uint length, int unsigned_fl, char **endptr, int *error); ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs, const char *str, uint length, int unsigned_fl, char **endptr, int *error); void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill); my_bool my_like_range_simple(CHARSET_INFO *cs, Loading mysql-test/r/client_xml.result +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b'); <resultset statement="select null from dual "> <row> <field name="NULL">NULL</field> <field name="NULL" xsi:nil="true" /> </row> </resultset> drop table t1; mysql-test/r/ctype_gbk.result +10 −0 Original line number Diff line number Diff line Loading @@ -168,3 +168,13 @@ DROP TABLE t1; select hex(convert(_gbk 0xA14041 using ucs2)); hex(convert(_gbk 0xA14041 using ucs2)) 003F0041 create table t1 (c1 text not null, c2 text not null) character set gbk; alter table t1 change c1 c1 mediumtext character set gbk not null; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` mediumtext NOT NULL, `c2` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=gbk drop table t1; End of 5.0 tests mysql-test/r/ctype_utf8.result +18 −0 Original line number Diff line number Diff line Loading @@ -1449,3 +1449,21 @@ set @a:=null; execute my_stmt using @a; a b drop table if exists t1; CREATE TABLE t1 ( colA int(11) NOT NULL, colB varchar(255) character set utf8 NOT NULL, PRIMARY KEY (colA) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar'); CREATE TABLE t2 ( colA int(11) NOT NULL, colB varchar(255) character set utf8 NOT NULL, KEY bad (colA,colB(3)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar'); SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB WHERE t1.colA < 3; colA colB colA colB 1 foo 1 foo 2 foo bar 2 foo bar DROP TABLE t1, t2; Loading
client/mysql.cc +8 −3 Original line number Diff line number Diff line Loading @@ -2509,10 +2509,15 @@ print_table_data_xml(MYSQL_RES *result) { tee_fprintf(PAGER, "\t<field name=\""); xmlencode_print(fields[i].name, (uint) strlen(fields[i].name)); if (cur[i]) { tee_fprintf(PAGER, "\">"); xmlencode_print(cur[i], lengths[i]); tee_fprintf(PAGER, "</field>\n"); } else tee_fprintf(PAGER, "\" xsi:nil=\"true\" />\n"); } (void) tee_fputs(" </row>\n", PAGER); } (void) tee_fputs("</resultset>\n", PAGER); Loading
include/m_ctype.h +10 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,9 @@ typedef struct my_charset_handler_st int *err); longlong (*strtoll10)(struct charset_info_st *cs, const char *nptr, char **endptr, int *error); ulonglong (*strntoull10rnd)(struct charset_info_st *cs, const char *str, uint length, int unsigned_fl, char **endptr, int *error); ulong (*scan)(struct charset_info_st *, const char *b, const char *e, int sq); } MY_CHARSET_HANDLER; Loading Loading @@ -341,6 +344,13 @@ longlong my_strtoll10_8bit(CHARSET_INFO *cs, longlong my_strtoll10_ucs2(CHARSET_INFO *cs, const char *nptr, char **endptr, int *error); ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs, const char *str, uint length, int unsigned_fl, char **endptr, int *error); ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs, const char *str, uint length, int unsigned_fl, char **endptr, int *error); void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill); my_bool my_like_range_simple(CHARSET_INFO *cs, Loading
mysql-test/r/client_xml.result +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b'); <resultset statement="select null from dual "> <row> <field name="NULL">NULL</field> <field name="NULL" xsi:nil="true" /> </row> </resultset> drop table t1;
mysql-test/r/ctype_gbk.result +10 −0 Original line number Diff line number Diff line Loading @@ -168,3 +168,13 @@ DROP TABLE t1; select hex(convert(_gbk 0xA14041 using ucs2)); hex(convert(_gbk 0xA14041 using ucs2)) 003F0041 create table t1 (c1 text not null, c2 text not null) character set gbk; alter table t1 change c1 c1 mediumtext character set gbk not null; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` mediumtext NOT NULL, `c2` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=gbk drop table t1; End of 5.0 tests
mysql-test/r/ctype_utf8.result +18 −0 Original line number Diff line number Diff line Loading @@ -1449,3 +1449,21 @@ set @a:=null; execute my_stmt using @a; a b drop table if exists t1; CREATE TABLE t1 ( colA int(11) NOT NULL, colB varchar(255) character set utf8 NOT NULL, PRIMARY KEY (colA) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar'); CREATE TABLE t2 ( colA int(11) NOT NULL, colB varchar(255) character set utf8 NOT NULL, KEY bad (colA,colB(3)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar'); SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB WHERE t1.colA < 3; colA colB colA colB 1 foo 1 foo 2 foo bar 2 foo bar DROP TABLE t1, t2;