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: // Testcase for bug 393952: crash when I try to VACUUM and one of the tables michael@0: // has a UNIQUE text column. StorageUnicodeFunctions::likeFunction() michael@0: // needs to handle null aArgv[0] and aArgv[1] michael@0: michael@0: function setup() michael@0: { michael@0: getOpenedDatabase().createTable("t1", "x TEXT UNIQUE"); michael@0: michael@0: var stmt = createStatement("INSERT INTO t1 (x) VALUES ('a')"); michael@0: stmt.execute(); michael@0: stmt.reset(); michael@0: stmt.finalize(); michael@0: } michael@0: michael@0: function test_vacuum() michael@0: { michael@0: var stmt = createStatement("VACUUM;"); michael@0: stmt.executeStep(); michael@0: stmt.reset(); michael@0: stmt.finalize(); michael@0: } michael@0: michael@0: var tests = [test_vacuum]; michael@0: michael@0: function run_test() michael@0: { michael@0: setup(); michael@0: michael@0: for (var i = 0; i < tests.length; i++) michael@0: tests[i](); michael@0: michael@0: cleanup(); michael@0: } michael@0: