1+ // Go MySQL Driver - A MySQL-Driver for Go's database/sql package
2+ //
3+ // Copyright 2024 The Go-MySQL-Driver Authors. All rights reserved.
4+ //
5+ // This Source Code Form is subject to the terms of the Mozilla Public
6+ // License, v. 2.0. If a copy of the MPL was not distributed with this file,
7+ // You can obtain one at http://mozilla.org/MPL/2.0/.
8+
19package mysql
210
311import (
@@ -30,7 +38,7 @@ func newMockBuf(data []byte) buffer {
3038func compressHelper (t * testing.T , mc * mysqlConn , uncompressedPacket []byte ) []byte {
3139 // get status variables
3240
33- cs := mc .compressionSequence
41+ cs := mc .compresSequence
3442
3543 var b bytes.Buffer
3644 cw := newCompressor (mc , & b )
@@ -46,13 +54,13 @@ func compressHelper(t *testing.T, mc *mysqlConn, uncompressedPacket []byte) []by
4654 }
4755
4856 if len (uncompressedPacket ) > 0 {
49- if mc .compressionSequence != (cs + 1 ) {
50- t .Fatalf ("mc.compressionSequence updated incorrectly, expected %d and saw %d" , (cs + 1 ), mc .compressionSequence )
57+ if mc .compresSequence != (cs + 1 ) {
58+ t .Fatalf ("mc.compressionSequence updated incorrectly, expected %d and saw %d" , (cs + 1 ), mc .compresSequence )
5159 }
5260
5361 } else {
54- if mc .compressionSequence != cs {
55- t .Fatalf ("mc.compressionSequence updated incorrectly for case of empty write, expected %d and saw %d" , cs , mc .compressionSequence )
62+ if mc .compresSequence != cs {
63+ t .Fatalf ("mc.compressionSequence updated incorrectly for case of empty write, expected %d and saw %d" , cs , mc .compresSequence )
5664 }
5765 }
5866
@@ -62,7 +70,7 @@ func compressHelper(t *testing.T, mc *mysqlConn, uncompressedPacket []byte) []by
6270// uncompressHelper uncompresses compressedPacket and checks state variables
6371func uncompressHelper (t * testing.T , mc * mysqlConn , compressedPacket []byte , expSize int ) []byte {
6472 // get status variables
65- cs := mc .compressionSequence
73+ cs := mc .compresSequence
6674
6775 // mocking out buf variable
6876 mc .buf = newMockBuf (compressedPacket )
@@ -76,12 +84,12 @@ func uncompressHelper(t *testing.T, mc *mysqlConn, compressedPacket []byte, expS
7684 }
7785
7886 if expSize > 0 {
79- if mc .compressionSequence != (cs + 1 ) {
80- t .Fatalf ("mc.compressionSequence updated incorrectly, expected %d and saw %d" , (cs + 1 ), mc .compressionSequence )
87+ if mc .compresSequence != (cs + 1 ) {
88+ t .Fatalf ("mc.compressionSequence updated incorrectly, expected %d and saw %d" , (cs + 1 ), mc .compresSequence )
8189 }
8290 } else {
83- if mc .compressionSequence != cs {
84- t .Fatalf ("mc.compressionSequence updated incorrectly for case of empty read, expected %d and saw %d" , cs , mc .compressionSequence )
91+ if mc .compresSequence != cs {
92+ t .Fatalf ("mc.compressionSequence updated incorrectly for case of empty read, expected %d and saw %d" , cs , mc .compresSequence )
8593 }
8694 }
8795 return uncompressedPacket
0 commit comments