diff --git a/product/ERP5Catalog/sql/common_mysql/z_create_record.zsql b/product/ERP5Catalog/sql/common_mysql/z_create_record.zsql index 6db04d088ba799c2a97eecb2c818edbc1fc694a1..d6c19482ce5e17ae204f122ec523bc76bb0cee57 100755 --- a/product/ERP5Catalog/sql/common_mysql/z_create_record.zsql +++ b/product/ERP5Catalog/sql/common_mysql/z_create_record.zsql @@ -13,10 +13,12 @@ class_file: # Table: 'record' # CREATE TABLE `record` ( + `uid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `path` varchar(255) NOT NULL default '', `catalog` BOOT NOT NULL default 0, `played` BOOL NOT NULL default 0, `date` DATETIME NOT NULL, - KEY `path` (`path`), + PRIMARY KEY (`uid`), KEY `played` (`played`) + KEY `date` (`date`), ) TYPE=InnoDB; diff --git a/product/ERP5Catalog/sql/common_mysql/z_delete_recorded_object_list.zsql b/product/ERP5Catalog/sql/common_mysql/z_delete_recorded_object_list.zsql index f7e3636210a05956bd2648b602d9d1cd082aa91d..f146abcc4df73fa25f1b2b51671cdd72858c5abb 100755 --- a/product/ERP5Catalog/sql/common_mysql/z_delete_recorded_object_list.zsql +++ b/product/ERP5Catalog/sql/common_mysql/z_delete_recorded_object_list.zsql @@ -7,7 +7,7 @@ cache_time:0 class_name: class_file: </dtml-comment> -<params>path</params> +<params>uid_list</params> <dtml-comment>Do not delete rows really, but just mark them as "played" to avoid dead locks</dtml-comment> <dtml-if path> UPDATE @@ -15,7 +15,7 @@ UPDATE SET played = 1 WHERE -<dtml-in path> - path = <dtml-sqlvar sequence-item type="string"><dtml-if sequence-end><dtml-else> OR </dtml-if> +<dtml-in uid_list> + uid = <dtml-sqlvar sequence-item type="string"><dtml-if sequence-end><dtml-else> OR </dtml-if> </dtml-in> </dtml-if> diff --git a/product/ERP5Catalog/sql/common_mysql/z_read_recorded_object_list.zsql b/product/ERP5Catalog/sql/common_mysql/z_read_recorded_object_list.zsql index 32ef6706456a67039b18789bb2e9b7995d66452f..ef25d1317cc5679cdba33d621a70d0d59f0f9e58 100755 --- a/product/ERP5Catalog/sql/common_mysql/z_read_recorded_object_list.zsql +++ b/product/ERP5Catalog/sql/common_mysql/z_read_recorded_object_list.zsql @@ -9,7 +9,7 @@ class_file: </dtml-comment> <params>catalog</params> SELECT - path + uid, path FROM record WHERE diff --git a/product/ERP5Catalog/sql/common_mysql/z_record_object_list.zsql b/product/ERP5Catalog/sql/common_mysql/z_record_object_list.zsql index 6c607a3de6f097d5a61b42eb3b64c3888494b09a..0bcec65a8f1d9be446bb1b975b4c0c9920959697 100755 --- a/product/ERP5Catalog/sql/common_mysql/z_record_object_list.zsql +++ b/product/ERP5Catalog/sql/common_mysql/z_record_object_list.zsql @@ -10,7 +10,7 @@ class_file: <params>path_list catalog</params> INSERT INTO - record + record (path, catalog, played, date) VALUES <dtml-in path_list> (