-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Oracle Stored Procedure #9199
Comments
Hi @JakeR92, can you please share a project that reproduce the issue? /cc @inponomarev who has been contributing to this feature :) |
Hi, I have the following stored procedure in an sql file that is passed into the test container to be run upon startup. INSERT INTO "Konnekt"."ProcedureVarChar" ("primaryKey", "uniqueKey", "mandatory", "optional", "defaultValue") CREATE TABLE "Konnekt"."ProcedureVarCharBK" AS CREATE OR REPLACE PROCEDURE "Konnekt"."insert_varchar_data"( Whenever I call the function it gets compile error. I debugged it and found that by the time the script runner runs the commands it is: CREATE OR REPLACE PROCEDURE "Konnekt"."insert_varchar_data"( Without the final ";". Oracle requires this final ";" otherwise it will not compile properly. |
Any updates? |
If the statement ends with ;; can we split by the last ; and keep the first ; as part of the statement? Example: init.oracle.sql: CREATE OR REPLACE PROCEDURE "sp_get_all_my_table"(total_count OUT INTEGER) AS
BEGIN
SELECT COUNT(*) INTO total_count FROM "MyTable";
END;; Split by last ; and therefore, the statement will be: CREATE OR REPLACE PROCEDURE "sp_get_all_my_table"(total_count OUT INTEGER) AS
BEGIN
SELECT COUNT(*) INTO total_count FROM "MyTable";
END; |
Module
Core
Testcontainers version
1.19.8
Using the latest Testcontainers version?
Yes
Host OS
Linux
Host Arch
x86
Docker version
Client: Docker Engine - Community Version: 27.2.0 API version: 1.47 Go version: go1.21.13 Git commit: 3ab4256 Built: Tue Aug 27 14:15:13 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 27.2.0 API version: 1.47 (minimum version 1.24) Go version: go1.21.13 Git commit: 3ab5c7d Built: Tue Aug 27 14:15:13 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.21 GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
What happened?
The init script runner removes all ";" when splitting, however oracles stored procedure command requires the ";" at the end otherwise it gets a compile error. Can you change it not to remove the ";" from the split commands?
Relevant log output
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: