Skip to content

Modify Table too aggressive -- long UI hangs and waits #1444

@tlhackque

Description

@tlhackque

Details for the issue

What did you do?

Modify table - the table has a couple of million records. (That's my test database...)

(1,868,892 to be precise... with modest indexing and foreign keys.)

Specifically, I clicked "add field", then to change the type from Integer to Text.

What did you expect to see?

The Type dropdown open immediately

What did you see instead?

Busy wait loop - while the browser happily copied the table to add the field.

Then, I changed it to integer - and again, long wait while the disk bangs around.

Several minutes with Windoze saying "not responding" is not acceptable.

What's REALLY annoying is that taking advantage of the wait, I clicked on my browser window to write this report. After a while, the GUI noticed that my mouse wasn't over the dropdown anymore, and decided that I changed my mind, and closed the dropdown on Integer - starting another copy.

It took about 5 iterations until I held my mouse steady (buttons up) over the dropdown before the browser finally agreed that text is the "final" end state.

When I DO click OK, it takes about another minute or so to finish up - and then a shorter (but still unresponsive to windows) wait while write changes is executed.

  • These changes should not cause any database activity until OK (or the missing Apply) button is clicked.

This includes changing a field type, modifying an attribute, moving it up or down...

  • When OK (or Apply) is clicked, some progress indicator (and updating windoze would be a good idea - e.g. 50,000 of 1,000,000 records copied...

Here is the application SQL Log showing the transactions. The only thing to pay attention to is the number of times that the browser tried to create a temporary table with the (new) "filedescription" field typed as "integer' - which I never wanted it to do.

SPRAGMA foreign_keys
ALTER TABLE `main`.`FILEs` ADD COLUMN 	`Field15`	INTEGER
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_1` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_1` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`Field15` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_1` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_2` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_2` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_2` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_3` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_3` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_3` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_4` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_4` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_4` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_5` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_5` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_5` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_6` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_6` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_6` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_7` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_7` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_7` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_8` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_8` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_8` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_9` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_9` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_9` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_10` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_10` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_10` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_11` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_11` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_11` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_12` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_12` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_12` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_13` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	INTEGER,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_13` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_13` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_14` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	TEXT,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_14` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_14` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_15` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	TEXT,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_15` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_15` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
CREATE TABLE `sqlb_temp_table_16` (
	`id`	integer,
	`cdid`	integer NOT NULL,
	`directory`	text,
	`filename`	text,
	`filesize`	integer,
	`fileallocation`	text,
	`uid`	text,
	`fileattributes`	text,
	`filecreated`	text,
	`filemodified`	text,
	`fileexpired`	text,
	`filebackup`	text,
	`fileowner`	text,
	`fileprotection`	text,
	`filedescription`	TEXT,
	FOREIGN KEY(`cdid`) REFERENCES `CDs`(`diskid`),
	PRIMARY KEY(`id`)
);
INSERT INTO `main`.`sqlb_temp_table_16` SELECT `id`,`cdid`,`directory`,`filename`,`filesize`,`fileallocation`,`uid`,`fileattributes`,`filecreated`,`filemodified`,`fileexpired`,`filebackup`,`fileowner`,`fileprotection`,`filedescription` FROM `main`.`FILEs`;
PRAGMA defer_foreign_keys
PRAGMA defer_foreign_keys = "1";
DROP TABLE `main`.`FILEs`;
ALTER TABLE `main`.`sqlb_temp_table_16` RENAME TO `FILEs`
PRAGMA defer_foreign_keys = "0";
CREATE INDEX `cdfilerefididx` ON `FILEs` (
	`cdid`
);
CREATE UNIQUE INDEX `pathindex` ON `FILEs` (
	`cdid`,
	`directory`,
	`filename`
);
PRAGMA database_list;
SELECT type,name,sql,tbl_name FROM `main`.sqlite_master;
SELECT `_rowid_`,* FROM `main`.`FILEs` ORDER BY `_rowid_` ASC LIMIT 0, 49999;
SELECT COUNT(*) FROM (SELECT `_rowid_`,* FROM `main`.`FILEs` ORDER BY `_rowid_` ASC);
SELECT `_rowid_`,* FROM `main`.`FILEs` ORDER BY `_rowid_` ASC LIMIT 0, 49999;
SELECT COUNT(*) FROM (SELECT `_rowid_`,* FROM `main`.`FILEs` ORDER BY `_rowid_` ASC);

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • [x ] Windows: ( version: 10 pro___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

What is your DB4S version?

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • [x ] Other: ___

Did you also

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions