Subject: | semicolon-delimited statements are grouped when custom delimiter given |
Date: | Thu, 22 Dec 2016 10:13:53 +0000 |
To: | bug-SQL-SplitStatement [...] rt.cpan.org |
From: | Bernie G <spraff [...] gmail.com> |
Below is a test input file.
If you split it with
my $sql_splitter = SQL::SplitStatement->new;
my @statements = $sql_splitter->split ($src);
then TableA and TableB are returned in separate statements, but TableC and
TableD are joined into a single statement.
The presence of the "DELIMETER |" statement should not prevent
semicolon-delimited statements from being separated.
TEST INPUT FILE BEGINS
===================
CREATE TABLE TableA
(
id INT
);
CREATE TABLE TableB
(
id INT
);
DELIMITER |
CREATE TABLE TableC
(
id INT
);
CREATE TABLE TableD
(
id INT
);