test_bug-429521.js (1164B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 function setup() { 6 getOpenedDatabase().createTable("t1", "x TEXT"); 7 8 var stmt = createStatement( 9 "INSERT INTO t1 (x) VALUES ('/mozilla.org/20070129_1/Europe/Berlin')" 10 ); 11 stmt.execute(); 12 stmt.finalize(); 13 } 14 15 function test_bug429521() { 16 var stmt = createStatement( 17 "SELECT DISTINCT(zone) FROM (" + 18 "SELECT x AS zone FROM t1 WHERE x LIKE '/mozilla.org%'" + 19 ");" 20 ); 21 22 print("*** test_bug429521: started"); 23 24 try { 25 while (stmt.executeStep()) { 26 print("*** test_bug429521: step() Read wrapper.row.zone"); 27 28 // BUG: the print commands after the following statement 29 // are never executed. Script stops immediately. 30 stmt.row.zone; 31 32 print("*** test_bug429521: step() Read wrapper.row.zone finished"); 33 } 34 } catch (e) { 35 print("*** test_bug429521: " + e); 36 } 37 38 print("*** test_bug429521: finished"); 39 40 stmt.finalize(); 41 } 42 43 function run_test() { 44 setup(); 45 46 test_bug429521(); 47 48 cleanup(); 49 }