Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
73f3fcae
Commit
73f3fcae
authored
Feb 09, 2011
by
Tom MacWright
Committed by
Konstantin Käfer
Feb 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding test for killer bug, not failing yet
parent
5230e8e1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
elmo.png
test/elmo.png
+0
-0
test.blob.js
test/test.blob.js
+56
-0
No files found.
test/elmo.png
0 → 100644
View file @
73f3fcae
158 KB
test/test.blob.js
0 → 100644
View file @
73f3fcae
var
sqlite
=
require
(
'sqlite3_bindings'
),
Step
=
require
(
'step'
),
fs
=
require
(
'fs'
),
assert
=
require
(
'assert'
);
var
db
=
new
sqlite
.
Database
();
// lots of elmo
var
elmo
=
fs
.
readFile
(
__dirname
+
'/elmo.png'
,
'binary'
);
exports
[
'Blob overflow test'
]
=
function
()
{
Step
(
function
()
{
db
.
open
(
__dirname
+
'/blobtest.sqlite'
,
this
);
},
function
()
{
db
.
prepare
(
'CREATE TABLE IF NOT EXISTS elmos ('
+
'image BLOB);'
,
function
(
err
,
statement
)
{
assert
.
isUndefined
(
err
);
statement
.
step
(
this
);
}.
bind
(
this
));
},
function
(
err
)
{
db
.
prepare
(
'INSERT INTO elmos (image) '
+
'VALUES (?)'
,
function
(
err
,
statement
)
{
assert
.
isUndefined
(
err
);
statement
.
bind
(
0
,
elmo
);
statement
.
step
(
this
);
}.
bind
(
this
));
},
function
()
{
var
group
=
this
.
group
();
for
(
var
i
=
0
;
i
<
1000000
;
i
++
)
{
console
.
log
(
'ELMO'
);
db
.
prepare
(
'INSERT INTO elmos (image) '
+
'VALUES (?)'
,
function
(
err
,
statement
)
{
Step
(
function
()
{
statement
.
bind
(
0
,
elmo
,
this
);
},
function
()
{
// DO IT
statement
.
step
(
group
());
}
);
}.
bind
(
this
));
}
}
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment