Skip to content

Commit 8cf0ba6

Browse files
author
Christopher J. Brody
committed
[TBD] add PENDING rename table with view test
PENDING due to KNOWN CRASH on SQLite 3.30.1 (Decmeber 2019) ref: - http://sqlite.1065341.n5.nabble.com/Crash-Bug-Report-tc109903.html - #904
1 parent 3952ac5 commit 8cf0ba6

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

spec/www/spec/basic-db-tx-sql-storage-results.js

+39
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,45 @@ var mytests = function() {
10791079
}
10801080
}, MYTIMEOUT);
10811081

1082+
// TBD December 2019 SQLite crash report ref:
1083+
// - http://sqlite.1065341.n5.nabble.com/Crash-Bug-Report-tc109903.html
1084+
// - https://github.com/xpbrew/cordova-sqlite-storage/issues/904
1085+
xit(suiteName + 'RENAME table with view test [SQLite crash bug report December 2019]', function(done) {
1086+
if (isWebSql) pending('[TBD] NOT WORKING on (WebKit) Web SQL');
1087+
if (!isWebSql && isAndroid && isImpl2) pending('[TBD] NOT WORKING on Android system android.database provider');
1088+
1089+
var dbname = 'RENAME-table-with-view-test.db';
1090+
var db = openDatabase(dbname);
1091+
1092+
db.transaction(function(tx) {
1093+
tx.executeSql('DROP TABLE IF EXISTS v0;');
1094+
tx.executeSql('DROP TABLE IF EXISTS v2;');
1095+
tx.executeSql('DROP TABLE IF EXISTS t3;');
1096+
tx.executeSql('DROP VIEW IF EXISTS v4;');
1097+
tx.executeSql('DROP TRIGGER IF EXISTS x;');
1098+
tx.executeSql('CREATE TABLE v0 ( v1 ) ;');
1099+
tx.executeSql('CREATE TABLE v2 ( v3 ) ;');
1100+
tx.executeSql('CREATE VIEW v4 AS WITH x AS ( SELECT x () OVER( ) FROM v4 ) SELECT v3 AS x FROM v2 ;');
1101+
tx.executeSql('ALTER TABLE v2 RENAME TO t3;');
1102+
tx.executeSql('SELECT COUNT(x) AS cnt FROM v4;', null, function(tx, rs) {
1103+
expect(rs).toBeDefined();
1104+
expect(rs.rows.length).toBe(1);
1105+
expect(rs.rows.item(0).cnt).toBe(0);
1106+
1107+
// Close (plugin only) & finish:
1108+
(isWebSql) ? done() : db.close(done, done);
1109+
});
1110+
}, function(e) {
1111+
// ERROR RESULT (NOT EXPECTED):
1112+
expect(false).toBe(true);
1113+
expect(e).toBeDefined();
1114+
expect(e.message).toBe('--');
1115+
1116+
// Close (plugin only) & finish:
1117+
(isWebSql) ? done() : db.close(done, done);
1118+
});
1119+
}, MYTIMEOUT);
1120+
10821121
});
10831122

10841123
});

0 commit comments

Comments
 (0)