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