mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-26 02:58:44 -06:00
Merge pull request #127 from liquidata-inc/tim/make-sql-scanner-buffer-larger
Increased the length of the buffer to read from STDIN for SQL stateme…
This commit is contained in:
@@ -165,6 +165,9 @@ func scanStatements(data []byte, atEOF bool) (advance int, token []byte, err err
|
||||
// runBatchMode processes queries until EOF and returns the resulting root value
|
||||
func runBatchMode(ctx context.Context, dEnv *env.DoltEnv, root *doltdb.RootValue) (*doltdb.RootValue, error) {
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
const maxCapacity = 512 * 1024
|
||||
buf := make([]byte, maxCapacity)
|
||||
scanner.Buffer(buf, maxCapacity)
|
||||
scanner.Split(scanStatements)
|
||||
|
||||
batcher := dsql.NewSqlBatcher(dEnv.DoltDB, root)
|
||||
|
||||
Reference in New Issue
Block a user