Update of /cvsroot/lxr/lxr/templates/initdb
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16021/templates/initdb
Modified Files:
initdb-m-template.sql
Log Message:
templates/initdb/initdb-m-template.sql: manage "relation" reference count directly from SQL trigger instead of from Perl programming; remove an unnecessary index
Index: initdb-m-template.sql
===================================================================
RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-m-template.sql,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- initdb-m-template.sql 21 Jan 2013 16:35:04 -0000 1.4
+++ initdb-m-template.sql 17 Nov 2013 09:28:36 -0000 1.5
@@ -278,7 +278,6 @@
, constraint %DB_tbl_prefix%fk_defn_fileid
foreign key (fileid)
references %DB_tbl_prefix%files(fileid)
- , index (typeid, langid)
, constraint %DB_tbl_prefix%fk_defn_type
foreign key (typeid, langid)
references %DB_tbl_prefix%langtypes(typeid, langid)
@@ -291,11 +290,18 @@
/* The following trigger maintains correct symbol reference count
* after definition deletion.
*/
+delimiter //
drop trigger if exists %DB_tbl_prefix%remove_definition;
create trigger %DB_tbl_prefix%remove_definition
after delete on %DB_tbl_prefix%definitions
for each row
- call %DB_tbl_prefix%decsym(old.symid);
+ begin
+ call %DB_tbl_prefix%decsym(old.symid);
+ if old.relid is not null
+ then call %DB_tbl_prefix%decsym(old.relid);
+ end if;
+ end//
+delimiter ;
/* Usages */
create table %DB_tbl_prefix%usages
|