@@ -1241,7 +1241,7 @@ func TestUint64(t *testing.T) {
1241
1241
}
1242
1242
1243
1243
func TestLongData (t * testing.T ) {
1244
- runTests (t , dsn + "&maxAllowedPacket=0" , func (dbt * DBTest ) {
1244
+ runTestsParallel (t , dsn + "&maxAllowedPacket=0" , func (dbt * DBTest , tbl string ) {
1245
1245
var maxAllowedPacketSize int
1246
1246
err := dbt .db .QueryRow ("select @@max_allowed_packet" ).Scan (& maxAllowedPacketSize )
1247
1247
if err != nil {
@@ -1254,7 +1254,7 @@ func TestLongData(t *testing.T) {
1254
1254
maxAllowedPacketSize = 1 << 25
1255
1255
}
1256
1256
1257
- dbt .mustExec ("CREATE TABLE test (value LONGBLOB)" )
1257
+ dbt .mustExec ("CREATE TABLE " + tbl + " (value LONGBLOB)" )
1258
1258
1259
1259
in := strings .Repeat (`a` , maxAllowedPacketSize + 1 )
1260
1260
var out string
@@ -1263,8 +1263,8 @@ func TestLongData(t *testing.T) {
1263
1263
// Long text data
1264
1264
const nonDataQueryLen = 28 // length query w/o value
1265
1265
inS := in [:maxAllowedPacketSize - nonDataQueryLen ]
1266
- dbt .mustExec ("INSERT INTO test VALUES('" + inS + "')" )
1267
- rows = dbt .mustQuery ("SELECT value FROM test" )
1266
+ dbt .mustExec ("INSERT INTO " + tbl + " VALUES('" + inS + "')" )
1267
+ rows = dbt .mustQuery ("SELECT value FROM " + tbl )
1268
1268
defer rows .Close ()
1269
1269
if rows .Next () {
1270
1270
rows .Scan (& out )
@@ -1279,11 +1279,11 @@ func TestLongData(t *testing.T) {
1279
1279
}
1280
1280
1281
1281
// Empty table
1282
- dbt .mustExec ("TRUNCATE TABLE test" )
1282
+ dbt .mustExec ("TRUNCATE TABLE " + tbl )
1283
1283
1284
1284
// Long binary data
1285
- dbt .mustExec ("INSERT INTO test VALUES(?)" , in )
1286
- rows = dbt .mustQuery ("SELECT value FROM test WHERE 1=?" , 1 )
1285
+ dbt .mustExec ("INSERT INTO " + tbl + " VALUES(?)" , in )
1286
+ rows = dbt .mustQuery ("SELECT value FROM " + tbl + " WHERE 1=?" , 1 )
1287
1287
defer rows .Close ()
1288
1288
if rows .Next () {
1289
1289
rows .Scan (& out )
0 commit comments