2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2008-08-04 10:04:27 -07:00
|
|
|
|
|
|
|
function setup()
|
|
|
|
{
|
|
|
|
getOpenedDatabase().createTable("t1", "x TEXT");
|
|
|
|
|
2012-05-02 10:01:39 -07:00
|
|
|
var stmt = createStatement("INSERT INTO t1 (x) VALUES ('/mozilla.org/20070129_1/Europe/Berlin')");
|
2008-08-04 10:04:27 -07:00
|
|
|
stmt.execute();
|
|
|
|
stmt.finalize();
|
|
|
|
}
|
|
|
|
|
|
|
|
function test_bug429521()
|
|
|
|
{
|
2012-05-02 10:01:39 -07:00
|
|
|
var stmt = createStatement(
|
2008-08-04 10:04:27 -07:00
|
|
|
"SELECT DISTINCT(zone) FROM ("+
|
|
|
|
"SELECT x AS zone FROM t1 WHERE x LIKE '/mozilla.org%'" +
|
|
|
|
");");
|
|
|
|
|
|
|
|
print("*** test_bug429521: started");
|
|
|
|
|
|
|
|
try {
|
2012-05-02 10:01:39 -07:00
|
|
|
while (stmt.executeStep()) {
|
2008-08-04 10:04:27 -07:00
|
|
|
print("*** test_bug429521: step() Read wrapper.row.zone");
|
|
|
|
|
|
|
|
// BUG: the print commands after the following statement
|
|
|
|
// are never executed. Script stops immediately.
|
2012-05-02 10:01:39 -07:00
|
|
|
var tzId = stmt.row.zone;
|
2008-08-04 10:04:27 -07:00
|
|
|
|
|
|
|
print("*** test_bug429521: step() Read wrapper.row.zone finished");
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
print("*** test_bug429521: " + e);
|
|
|
|
}
|
|
|
|
|
|
|
|
print("*** test_bug429521: finished");
|
|
|
|
|
2012-05-02 10:01:39 -07:00
|
|
|
stmt.finalize();
|
2008-08-04 10:04:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function run_test()
|
|
|
|
{
|
|
|
|
setup();
|
|
|
|
|
|
|
|
test_bug429521();
|
|
|
|
|
|
|
|
cleanup();
|
|
|
|
}
|