Skip to content

Commit ed0fc1f

Browse files
committedMay 7, 2012
WIP
1 parent 5f5a1c7 commit ed0fc1f

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed
 

‎benchmark/node-mysql/select.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
// Last v8 profile when running this test for 500k rows:
22
// https://gist.github.com/f85c38010c038e5efe2e
3-
require('../../test/common');
4-
var Client = require('mysql/client'),
5-
client = Client(TEST_CONFIG),
3+
var common = require('../../test/common');
4+
var Client = require('../../lib/client'),
5+
client = common.createClient(),
66
rows = 0;
77

88
client.typeCast = false;
99

10-
client.connect();
11-
client.query('CREATE DATABASE '+TEST_DB, function(err) {
12-
if (err && err.number != Client.ERROR_DB_CREATE_EXISTS) {
13-
throw err;
14-
}
10+
client.query('CREATE DATABASE '+common.TEST_DB, function(err) {
11+
//if (err && err.number != Client.ERROR_DB_CREATE_EXISTS) {
12+
//throw err;
13+
//}
1514
});
1615

17-
client.query('USE '+TEST_DB);
16+
client.query('USE '+common.TEST_DB);
1817
var selectStart = +new Date;
1918

2019
function query() {
2120
client
22-
.query('SELECT * FROM '+TEST_TABLE)
21+
.query('SELECT * FROM '+common.TEST_TABLE)
2322
.on('row', function(row) {
2423
rows++;
2524
})

0 commit comments

Comments
 (0)