HandlerSocket-Plugin-for-MySQL
HandlerSocket-Plugin-for-MySQL copied to clipboard
String truncation,get wrong query result
Environment: MySQL server : Percona 5.1.55, default with handlersocket client: python2.5 ,with pyhs
you can reproduce the problem :
- CREATE TABLE
file.test(idint(10) unsigned NOT NULL AUTO_INCREMENT,stringchar(2) NOT NULL, PRIMARY KEY (id), KEYIndex_string(string) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2.insert into test(string) values('12')
3.Query by handlersocket like this SQL : select id from test where string = '123';
The result should be null,however, handlersocket found ‘12’ corresponding to the id value.
I guess handlersocket cut off in accordance with the definition of string field
client pyhs is no problem.pyhs's bebug info is :
DEBUG: sent data: P 0 file test Index_string id
DEBUG: read data bucket: 0 1
DEBUG: sent data: 0 = 1 123 0 0
DEBUG: read data bucket: 0 1 1