This problem is that you are using a separate transaction for each step, instead of reusing it, which is why it does not work well.
db.transaction is a transaction, so BEGIN / COMMIT is not required.
:
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024);
var msg;
db.transaction(function (tx) {
for(var i=0;i<1000;i++)
{
txquer(tx, i,"test");
}
});
db.transaction(function (tx) {
tx.executeSql('SELECT * FROM LOGS', [], function (tx, results) {
var len = results.rows.length, i;
msg = "<p>Found rows: " + len + "</p>";
document.querySelector('#status').innerHTML += msg;
}, null);
});
function txquer(tx,i,test)
{
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (?, ?)',[i,test]);
}
</script>
</head>
<body>
<div id="status" name="status">Status Message</div>
</body>
</html>