diff --git a/data/load_data.go b/data/load_data.go index 1dc3c6c..f6c8f75 100644 --- a/data/load_data.go +++ b/data/load_data.go @@ -98,6 +98,9 @@ func (c *LoadDataSuite) splitTableRegion(db *sql.DB, t *TableInfo, rows, regionR return } regionNum := rows / regionRowNum + if regionNum <= 1 { + return + } fmt.Printf("split %v regions for table %v\n", regionNum, t.DBTableName()) split := fmt.Sprintf("split table %v between (0) and (%v) regions %v;", t.DBTableName(), rows, regionNum) diff --git a/payload/basic_query.go b/payload/basic_query.go index edac107..65f423d 100644 --- a/payload/basic_query.go +++ b/payload/basic_query.go @@ -162,8 +162,8 @@ func (c *basicQuerySuite) prepare() error { return err } c.tblInfo = tblInfo - load := data.NewLoadDataSuite(c.cfg) - return load.Prepare(tblInfo, c.rows, c.rows/100000) + load := data.NewLoadDataSuit(c.cfg) + return load.Prepare(tblInfo, c.rows, 100000) } func (c *basicQuerySuite) Run() error {