nicholasren / open-replicator

Automatically exported from code.google.com/p/open-replicator
0 stars 0 forks source link

Enum Type not getting value. #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

First thanks for this great code, it works fine for most cases I have tested.

I tested with following table.

create table tab4 (e enum("A", "B"));

insert into tab4 (e) values ("B");

I was expecting value "B" to be in row value. But instead I got "2". Is this 
the expected behavior? Am I getting the index into the enum position ?

========

QueryEvent[header=BinlogEventV4HeaderImpl[timestamp=1383093872000,eventType=2,se
rverId=10005,eventLength=69,nextPosition=449,flags=8,timestampOfReceipt=13831615
64731],threadId=47,elapsedTime=0,databaseNameLength=5,errorCode=0,statusVariable
sLength=26,statusVariables=[QFlags2Code[flags=0], QSQLModeCode[sqlMode=0], 
QCatalogNzCode[catalogName=std], 
QCharsetCode[characterSetClient=33,collationConnection=33,collationServer=33]],d
atabaseName=test1,sql=BEGIN]
TableMapEvent[header=BinlogEventV4HeaderImpl[timestamp=1383093872000,eventType=1
9,serverId=10005,eventLength=46,nextPosition=495,flags=0,timestampOfReceipt=1383
161564732],tableId=44,reserved=1,databaseNameLength=5,databaseName=test1,tableNa
meLength=4,tableName=tab4,columnCount=1,columnTypes={-2},columnMetadataCount=2,c
olumnMetadata=Metadata[metadata={63233}],columnNullabilities=1]
WriteRowsEvent[header=BinlogEventV4HeaderImpl[timestamp=1383093872000,eventType=
23,serverId=10005,eventLength=31,nextPosition=526,flags=0,timestampOfReceipt=138
3161564732],tableId=44,reserved=1,columnCount=1,usedColumns=1,rows=[Row[columns=
[2]]]]
=====

Original issue reported on code.google.com by sur...@groupon.com on 30 Oct 2013 at 7:36

GoogleCodeExporter commented 9 years ago
it is the binary value of enum

Original comment by whitesoc...@gmail.com on 12 May 2014 at 11:29