MobileBlur

Diff
Login

Differences From Artifact [450fe7200b]:

To Artifact [ca9bc8dfa0]:


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
UNSIGNED_INT64_LENGTH = 8

DEFAULT_CHARSET = 'latin1'
MAX_PACKET_LENGTH = 256*256*256-1


def dump_packet(data):
    
    def is_ascii(data):
        if byte2int(data) >= 65 and byte2int(data) <= 122: #data.isalnum():
            return data
        return '.'
    print "packet length %d" % len(data)
    print "method call[1]: %s" % sys._getframe(1).f_code.co_name
    print "method call[2]: %s" % sys._getframe(2).f_code.co_name







|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
UNSIGNED_INT64_LENGTH = 8

DEFAULT_CHARSET = 'latin1'
MAX_PACKET_LENGTH = 256*256*256-1


def dump_packet(data):

    def is_ascii(data):
        if byte2int(data) >= 65 and byte2int(data) <= 122: #data.isalnum():
            return data
        return '.'
    print "packet length %d" % len(data)
    print "method call[1]: %s" % sys._getframe(1).f_code.co_name
    print "method call[2]: %s" % sys._getframe(2).f_code.co_name
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
        #sock = self.socket
        #sock.send(send_data)

        #

    def _execute_command(self, command, sql):
        self._send_command(command, sql)
        
    def _request_authentication(self):
        self._send_authentication()

    def _send_authentication(self):
        sock = self.socket
        self.client_flag |= CAPABILITIES
        if self.server_version.startswith('5'):







|







711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
        #sock = self.socket
        #sock.send(send_data)

        #

    def _execute_command(self, command, sql):
        self._send_command(command, sql)

    def _request_authentication(self):
        self._send_authentication()

    def _send_authentication(self):
        sock = self.socket
        self.client_flag |= CAPABILITIES
        if self.server_version.startswith('5'):
926
927
928
929
930
931
932

            field = self.connection.read_packet(FieldDescriptorPacket)
            self.fields.append(field)
            description.append(field.description())

        eof_packet = self.connection.read_packet()
        assert eof_packet.is_eof_packet(), 'Protocol error, expecting EOF'
        self.description = tuple(description)








>
926
927
928
929
930
931
932
933
            field = self.connection.read_packet(FieldDescriptorPacket)
            self.fields.append(field)
            description.append(field.description())

        eof_packet = self.connection.read_packet()
        assert eof_packet.is_eof_packet(), 'Protocol error, expecting EOF'
        self.description = tuple(description)