At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
------------------------------------------------------------
revno: 153
revision-id: mtaylor@stripped
parent: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Thu 2007-09-20 15:42:11 +0200
message:
Added table creation to lua test script.
modified:
lua/test.lua test.lua-20070920131233-idnreujp7bwxsxre-1
------------------------------------------------------------
revno: 149.1.13
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Thu 2007-09-20 15:32:31 +0200
message:
Added drop/create table to lua test program.
modified:
lua/test.lua test.lua-20070920131233-idnreujp7bwxsxre-1
=== modified file 'lua/test.lua'
--- a/lua/test.lua 2007-09-20 13:12:36 +0000
+++ b/lua/test.lua 2007-09-20 13:32:31 +0000
@@ -1,5 +1,28 @@
require("ndbapi")
-
+require("luasql.mysql")
+
+env=luasql.mysql()
+num_iter=1000
+INSERT_NUM=1000
+BATCH_SIZE=1000
+
+db = env:connect("test","root")
+
+print "Dropping and recreating schema\n"
+
+db:execute("drop table if exists mytablename")
+
+db:execute("CREATE TABLE if not exists"
+ .. " mytablename "
+ .. " (ATTR1 INT UNSIGNED not null auto_increment, "
+ .. " ATTR2 INT UNSIGNED NOT NULL, "
+ .. " PRIMARY KEY USING HASH (ATTR1)) "
+ .. " ENGINE=NDBCLUSTER")
+
+
+-- Connect to cluster
+
+print "connecting to cluster\n"
ndbapi.ndb_init()
| Thread |
|---|
| • Rev 153: Added table creation to lua test script. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel | Monty Taylor | 20 Sep |