<commit_before>package fastsql

import (
	"log"
	"net/url"
	"os"
	"testing"
)

const (
	MYSQL_ADDR string = "127.0.0.1"
	MYSQL_DB   string = "test"
	MYSQL_USER string = "travis"
	MYSQL_PASS string = ""
)

var (
	dbh *DB
)

func TestMain(m *testing.M) {
	var (
		err   error
		query string
	)

	// Create new FastSQL DB object with a flush-interval of 100 rows
	if dbh, err = Open("mysql", MYSQL_USER+":"+MYSQL_PASS+"@tcp("+MYSQL_ADDR+":3306)/"+MYSQL_DB+"?"+url.QueryEscape("charset=utf8mb4,utf8&loc=America/New_York"), 100); err != nil {
		log.Fatalln(err)
	}
	defer dbh.Close()

	query = `
		CREATE TABLE test_bulk_insert (
			id tinyint(3) unsigned NOT NULL,
			id2 tinyint(3) unsigned NOT NULL,
			id3 tinyint(3) unsigned NOT NULL,
		) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;`

	if _, err = dbh.Exec(query); err != nil {
		log.Fatalln(err)
	}

	os.Exit(m.Run())
}

func testBulkInsert(t *testing.T) {
	var (
		i   uint = 1
		err error
	)

	// Loop performing SQL INSERTs
	for i <= 250 {
		if err = dbh.BatchInsert("INSERT INTO test_bulk_insert(id, id2, id3) VALUES(?, ?, ?);", i, i+1, i+2); err != nil {
			t.Fatal(err)
		}

		i++
	}

	if err = dbh.FlushAll(); err != nil {
		t.Fatal(err)
	}
}
<commit_msg>Fixed CREATE TABLE query #19<commit_after>package fastsql

import (
	"log"
	"net/url"
	"os"
	"testing"
)

const (
	MYSQL_ADDR string = "127.0.0.1"
	MYSQL_DB   string = "test"
	MYSQL_USER string = "travis"
	MYSQL_PASS string = ""
)

var (
	dbh *DB
)

func TestMain(m *testing.M) {
	var (
		err   error
		query string
	)

	// Create new FastSQL DB object with a flush-interval of 100 rows
	if dbh, err = Open("mysql", MYSQL_USER+":"+MYSQL_PASS+"@tcp("+MYSQL_ADDR+":3306)/"+MYSQL_DB+"?"+url.QueryEscape("charset=utf8mb4,utf8&loc=America/New_York"), 100); err != nil {
		log.Fatalln(err)
	}
	defer dbh.Close()

	query = `
		CREATE TABLE test_bulk_insert (
			id tinyint(3) unsigned NOT NULL,
			id2 tinyint(3) unsigned NOT NULL,
			id3 tinyint(3) unsigned NOT NULL
		) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;`

	if _, err = dbh.Exec(query); err != nil {
		log.Fatalln(err)
	}

	os.Exit(m.Run())
}

func testBulkInsert(t *testing.T) {
	var (
		i   uint = 1
		err error
	)

	// Loop performing SQL INSERTs
	for i <= 250 {
		if err = dbh.BatchInsert("INSERT INTO test_bulk_insert(id, id2, id3) VALUES(?, ?, ?);", i, i+1, i+2); err != nil {
			t.Fatal(err)
		}

		i++
	}

	if err = dbh.FlushAll(); err != nil {
		t.Fatal(err)
	}
}

{'fraction_non_alphanumeric': 0.15619967793880837, 'fraction_numerical': 0.029790660225442835, 'mean_word_length': 3.542961608775137, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2598405', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1067, 'n_words': 242}