Browse Source
Prior to this commit, ScriptUtils.executeSqlScript() treated every statement within the script as if it were a single insert/update/delete statement. This disregarded the fact that the execution of a JDBC Statement can result in multiple individual statements, some of which result in a ResultSet and others that result in an update count. For example, when executing a stored procedure on Sybase, ScriptUtils did not execute all statements within the stored procedure. To address that, this commit revises the implementation of ScriptUtils.executeSqlScript() so that it handles multiple results and differentiates between result sets and update counts. Closes gh-35248pull/35405/head
6 changed files with 106 additions and 20 deletions
@ -1,7 +1,7 @@ |
|||||||
DROP TABLE users IF EXISTS; |
DROP TABLE users IF EXISTS; |
||||||
|
|
||||||
CREATE TABLE users ( |
CREATE TABLE users ( |
||||||
id INTEGER GENERATED BY DEFAULT AS IDENTITY, |
id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) PRIMARY KEY, |
||||||
first_name VARCHAR(50) NOT NULL, |
first_name VARCHAR(50) NOT NULL, |
||||||
last_name VARCHAR(50) NOT NULL |
last_name VARCHAR(50) NOT NULL |
||||||
); |
); |
||||||
|
|||||||
Loading…
Reference in new issue