mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-08-10 04:10:19 +00:00
[misc] adding bulk benchmark
This commit is contained in:
@ -29,6 +29,18 @@ def init_db(conn, paramstyle):
|
||||
else:
|
||||
cursor.executemany("INSERT INTO num_test VALUES (%s,%s,%s,%s,%s,%s)",
|
||||
vals)
|
||||
|
||||
cursor.execute("DROP TABLE IF EXISTS perfTestTextBatch")
|
||||
try:
|
||||
cursor.execute("INSTALL SONAME 'ha_blackhole'")
|
||||
except Error:
|
||||
pass
|
||||
createTable = "CREATE TABLE perfTestTextBatch (id MEDIUMINT NOT NULL AUTO_INCREMENT,t0 text, PRIMARY KEY (id)) COLLATE='utf8mb4_unicode_ci'"
|
||||
try:
|
||||
cursor.execute(createTable + " ENGINE = BLACKHOLE")
|
||||
except Exception:
|
||||
cursor.execute(createTable)
|
||||
|
||||
conn.commit()
|
||||
del cursor
|
||||
|
||||
|
Reference in New Issue
Block a user