1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/storage/test/unit/test_bug-429521.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +function setup() 1.9 +{ 1.10 + getOpenedDatabase().createTable("t1", "x TEXT"); 1.11 + 1.12 + var stmt = createStatement("INSERT INTO t1 (x) VALUES ('/mozilla.org/20070129_1/Europe/Berlin')"); 1.13 + stmt.execute(); 1.14 + stmt.finalize(); 1.15 +} 1.16 + 1.17 +function test_bug429521() 1.18 +{ 1.19 + var stmt = createStatement( 1.20 + "SELECT DISTINCT(zone) FROM ("+ 1.21 + "SELECT x AS zone FROM t1 WHERE x LIKE '/mozilla.org%'" + 1.22 + ");"); 1.23 + 1.24 + print("*** test_bug429521: started"); 1.25 + 1.26 + try { 1.27 + while (stmt.executeStep()) { 1.28 + print("*** test_bug429521: step() Read wrapper.row.zone"); 1.29 + 1.30 + // BUG: the print commands after the following statement 1.31 + // are never executed. Script stops immediately. 1.32 + var tzId = stmt.row.zone; 1.33 + 1.34 + print("*** test_bug429521: step() Read wrapper.row.zone finished"); 1.35 + } 1.36 + } catch (e) { 1.37 + print("*** test_bug429521: " + e); 1.38 + } 1.39 + 1.40 + print("*** test_bug429521: finished"); 1.41 + 1.42 + stmt.finalize(); 1.43 +} 1.44 + 1.45 +function run_test() 1.46 +{ 1.47 + setup(); 1.48 + 1.49 + test_bug429521(); 1.50 + 1.51 + cleanup(); 1.52 +}