com.continuent.tungsten.replicator.extractor.mysql
Class QueryLogEvent

java.lang.Object
  extended by com.continuent.tungsten.replicator.extractor.mysql.LogEvent
      extended by com.continuent.tungsten.replicator.extractor.mysql.QueryLogEvent
Direct Known Subclasses:
ExecuteLoadQueryLogEvent

public class QueryLogEvent
extends LogEvent

Version:
1.0
Author:
Seppo Jaakola, Stephane Giron

Field Summary
protected  byte[] charset
           
protected  boolean charset_inited
           
protected  java.lang.String charsetName
           
protected  int clientCharsetId
           
protected  int clientCollationId
           
protected  java.lang.String databaseName
           
protected  int errorCode
           
protected  boolean parseStatements
           
protected  java.lang.String query
          Fixed data part: 4 bytes.
protected  byte[] queryAsBytes
           
protected  int serverCollationId
           
protected  long threadId
           
 
Fields inherited from class com.continuent.tungsten.replicator.extractor.mysql.LogEvent
execTime, flags, logPos, serverId, startPosition, threadSpecificEvent, type, when
 
Constructor Summary
protected QueryLogEvent(byte[] buffer, FormatDescriptionLogEvent descriptionEvent, int eventType)
           
  QueryLogEvent(byte[] buffer, int eventLength, FormatDescriptionLogEvent descriptionEvent, boolean parseStatements, boolean useBytesForString, java.lang.String currentPosition)
           
 
Method Summary
protected  int extractStatusVariables(byte[] buffer, int start, int end)
           
 java.lang.String getAutocommitFlag()
          Returns the flagAutocommit value.
 int getAutoIncrementIncrement()
           
 int getAutoIncrementOffset()
           
 java.lang.String getAutoIsNullFlag()
          Returns the flagAutoIsNull value.
 java.lang.String getCharsetName()
          Return the native charset used to store query as bytes.
 int getClientCharsetId()
          Returns the charsetID value.
 int getClientCollationId()
          Returns the clientCollationId value.
 java.lang.String getDefaultDb()
           
 int getErrorCode()
           
 java.lang.String getForeignKeyChecksFlag()
          Returns the flagForeignKeyChecks value.
 java.lang.String getQuery()
           
 byte[] getQueryAsBytes()
           
 int getServerCollationId()
          Returns the serverCollationId value.
 long getSessionId()
           
 java.lang.String getSqlMode()
          Returns the sqlModeAsString value.
 java.lang.String getUniqueChecksFlag()
          Returns the flagUniqueChecks value.
 
Methods inherited from class com.continuent.tungsten.replicator.extractor.mysql.LogEvent
doChecksum, extractDecimal, getDecimalBinarySize, getExecTime, getNextEventPosition, getType, getWhen, hexdump, hexdump, hexdump, readLogEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

protected java.lang.String query
Fixed data part: Variable part: Source : http://forge.mysql.com/wiki/MySQL_Internals_Binary_Log


queryAsBytes

protected byte[] queryAsBytes

charsetName

protected java.lang.String charsetName

databaseName

protected java.lang.String databaseName

errorCode

protected int errorCode

threadId

protected long threadId

charset_inited

protected boolean charset_inited

charset

protected byte[] charset

clientCharsetId

protected int clientCharsetId

clientCollationId

protected int clientCollationId

serverCollationId

protected int serverCollationId

parseStatements

protected boolean parseStatements
Constructor Detail

QueryLogEvent

protected QueryLogEvent(byte[] buffer,
                        FormatDescriptionLogEvent descriptionEvent,
                        int eventType)
                 throws ReplicatorException
Throws:
ReplicatorException

QueryLogEvent

public QueryLogEvent(byte[] buffer,
                     int eventLength,
                     FormatDescriptionLogEvent descriptionEvent,
                     boolean parseStatements,
                     boolean useBytesForString,
                     java.lang.String currentPosition)
              throws ReplicatorException
Throws:
ReplicatorException
Method Detail

getQuery

public java.lang.String getQuery()

getDefaultDb

public java.lang.String getDefaultDb()

getSessionId

public long getSessionId()

getErrorCode

public int getErrorCode()

extractStatusVariables

protected int extractStatusVariables(byte[] buffer,
                                     int start,
                                     int end)
                              throws ReplicatorException
Throws:
ReplicatorException

getSqlMode

public java.lang.String getSqlMode()
Returns the sqlModeAsString value.

Returns:
Returns the sqlModeAsString.

getAutoIsNullFlag

public java.lang.String getAutoIsNullFlag()
Returns the flagAutoIsNull value.

Returns:
Returns the flagAutoIsNull.

getForeignKeyChecksFlag

public java.lang.String getForeignKeyChecksFlag()
Returns the flagForeignKeyChecks value.

Returns:
Returns the flagForeignKeyChecks.

getAutocommitFlag

public java.lang.String getAutocommitFlag()
Returns the flagAutocommit value.

Returns:
Returns the flagAutocommit.

getUniqueChecksFlag

public java.lang.String getUniqueChecksFlag()
Returns the flagUniqueChecks value.

Returns:
Returns the flagUniqueChecks.

getClientCharsetId

public int getClientCharsetId()
Returns the charsetID value.

Returns:
Returns the charsetID.

getClientCollationId

public int getClientCollationId()
Returns the clientCollationId value.

Returns:
Returns the clientCollationId.

getServerCollationId

public int getServerCollationId()
Returns the serverCollationId value.

Returns:
Returns the serverCollationId.

getAutoIncrementIncrement

public int getAutoIncrementIncrement()

getAutoIncrementOffset

public int getAutoIncrementOffset()

getQueryAsBytes

public byte[] getQueryAsBytes()

getCharsetName

public java.lang.String getCharsetName()
Return the native charset used to store query as bytes.