File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ CREATE TRIGGER IF NOT EXISTS remove_if_it_was_the_last_file_link
2+ -- Delete the direntry when is removed it's last static link
3+ AFTER DELETE ON links
4+ WHEN NOT EXISTS
5+ (
6+ SELECT * FROM links
7+ WHERE child_entry = OLD .child_entry
8+ LIMIT 1
9+ )
10+ BEGIN
11+ DELETE FROM dir_entries
12+ WHERE dir_entries .inode = OLD .child_entry ;
13+ END;
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ def test_begintag(self):
6969 self .assertEqual (len (stmts ), 3 )
7070 self .ndiffAssertEqual ('' .join (unicode (q ) for q in stmts ), sql )
7171
72+ def test_begintag_2 (self ):
73+ sql = load_file ('begintag_2.sql' )
74+ stmts = sqlparse .parse (sql )
75+ self .assertEqual (len (stmts ), 1 )
76+ self .ndiffAssertEqual ('' .join (unicode (q ) for q in stmts ), sql )
77+
7278 def test_dropif (self ):
7379 sql = 'DROP TABLE IF EXISTS FOO;\n \n SELECT * FROM BAR;'
7480 stmts = sqlparse .parse (sql )
You can’t perform that action at this time.
0 commit comments