Class: Mysql::InitialPacket

Inherits:
Object show all
Defined in:
lib/nose/proxy/mysql.rb

Overview

Add serialization of the initial packet

Class Method Summary collapse

Class Method Details

.serializeString

Serialize the initial server hello

Returns:

  • (String)


174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/nose/proxy/mysql.rb', line 174

def self.serialize
  [
    ::Mysql::Protocol::VERSION,
    'nose',
    0,
    'AAAAAAAA',
    0,
    CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION,
    33, # utf8_general_ci
    SERVER_STATUS_AUTOCOMMIT,
    'AAAAAAAAAAAA'
  ].pack('CZ*Va8CvCvx13Z*')
end