Skip to content
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

handling out paramters stopped working #285

Closed
hmmftg opened this issue Dec 24, 2022 · 3 comments
Closed

handling out paramters stopped working #285

hmmftg opened this issue Dec 24, 2022 · 3 comments

Comments

@hmmftg
Copy link
Contributor

hmmftg commented Dec 24, 2022

Hi
First of all, thanks for great driver
recently after I uopdated my project to emulate and check broken-pipe problem, new compiled binary gets:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small

When I try to execute out-paramater example I also get this error:

Connection string:  oracle://user:pass@server:poer/?SID=sid&TRACE FILE=oracle_trace.log
Finish create table GOORA_TEMP_VISIT : 1.028699205s
100 rows inserted:  1.525866289s
Can't get output parameters ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 2

Finish drop table:  67.15662ms

in my oracle_trace file:

2022-12-24T15:02:24.9767: Exec With Context:
2022-12-24T15:02:24.9767: Exec:
BEGIN
SELECT VISIT_ID, NAME, VAL, VISIT_DATE INTO :1, :2, :3, :4 FROM GOORA_TEMP_VISIT WHERE VISIT_ID = 1;
END;
2022-12-24T15:02:24.9767:     0:
{{} 0xc000292b38 false}
2022-12-24T15:02:24.9768:     1:
{{} 0xc000287810 false}
2022-12-24T15:02:24.9768:     2:
{{} 0xc000292b40 false}
2022-12-24T15:02:24.9768:     3:
{{} 0001-01-01 00:00:00 +0000 UTC false}
2022-12-24T15:02:24.9768: 
Write packet:
00000000  00 ef 00 00 06 00 00 00  00 00 03 5e 00 03 04 05  |...........^....|
00000010  29 00 01 01 6f 01 01 0d  00 00 00 00 04 7f ff ff  |)...o...........|
00000020  ff 01 01 04 00 00 00 00  00 00 00 00 00 01 00 00  |................|
00000030  00 00 00 6f 42 45 47 49  4e 0a 53 45 4c 45 43 54  |...oBEGIN.SELECT|
00000040  20 56 49 53 49 54 5f 49  44 2c 20 4e 41 4d 45 2c  | VISIT_ID, NAME,|
00000050  20 56 41 4c 2c 20 56 49  53 49 54 5f 44 41 54 45  | VAL, VISIT_DATE|
00000060  20 49 4e 54 4f 20 3a 31  2c 20 3a 32 2c 20 3a 33  | INTO :1, :2, :3|
00000070  2c 20 3a 34 20 46 52 4f  4d 20 47 4f 4f 52 41 5f  |, :4 FROM GOORA_|
00000080  54 45 4d 50 5f 56 49 53  49 54 20 57 48 45 52 45  |TEMP_VISIT WHERE|
00000090  20 56 49 53 49 54 5f 49  44 20 3d 20 31 3b 0a 45  | VISIT_ID = 1;.E|
000000a0  4e 44 3b 01 01 01 01 00  00 00 00 00 00 00 02 80  |ND;.............|
000000b0  00 00 00 00 02 03 00 00  01 16 00 00 00 00 00 00  |................|
000000c0  00 01 03 00 00 00 00 01  10 00 00 02 02 30 01 00  |.............0..|
000000d0  02 03 00 00 01 16 00 00  00 00 00 00 00 0c 03 00  |................|
000000e0  00 01 0b 00 00 00 00 00  00 00 07 00 00 00 00     |...............|
2022-12-24T15:02:24.9884: 
Read packet:
00000000  00 0b 00 00 0c 00 00 00  01 00 01                 |...........|
2022-12-24T15:02:24.9888: 
Read packet:
00000000  00 0b 00 00 0c 00 00 00  01 00 02                 |...........|
2022-12-24T15:02:24.9888: 
Write packet:
00000000  00 0b 00 00 0c 00 00 00  01 00 02                 |...........|
2022-12-24T15:02:24.9946: 
Read packet:
00000000  00 98 00 00 06 00 00 00  00 00 04 01 01 01 71 00  |..............q.|
00000010  02 19 66 00 00 01 0b 00  2f 00 00 00 00 00 03 07  |..f...../.......|
00000020  ea 72 02 01 7e 00 03 01  db ae 01 29 00 00 00 00  |.r..~......)....|
00000030  00 00 00 00 00 62 4f 52  41 2d 30 36 35 30 32 3a  |.....bORA-06502:|
00000040  20 50 4c 2f 53 51 4c 3a  20 6e 75 6d 65 72 69 63  | PL/SQL: numeric|
00000050  20 6f 72 20 76 61 6c 75  65 20 65 72 72 6f 72 3a  | or value error:|
00000060  20 63 68 61 72 61 63 74  65 72 20 73 74 72 69 6e  | character strin|
00000070  67 20 62 75 66 66 65 72  20 74 6f 6f 20 73 6d 61  |g buffer too sma|
00000080  6c 6c 0a 4f 52 41 2d 30  36 35 31 32 3a 20 61 74  |ll.ORA-06512: at|
00000090  20 6c 69 6e 65 20 32 0a                           | line 2.|
2022-12-24T15:02:24.9948: Summary: RetCode:6502, Error Message:"ORA-06502: PL/SQL: numeric or value error: character string buffer too small\nORA-06512: at line 2\n"
2022-12-24T15:02:24.9948: 
Write packet:
00000000  00 15 00 00 06 00 00 00  00 00 11 69 00 01 01 01  |...........i....|
00000010  01 0b 03 93 00                                    |.....|
2022-12-24T15:02:24.9993: 
Read packet:
00000000  00 0f 00 00 06 00 00 00  00 00 09 01 01 01 73     |..............s|

if I can help with more information, please let me know.

@hmmftg
Copy link
Contributor Author

hmmftg commented Dec 24, 2022

I've tried previous versions, this issue happens after version 2.5.4 and with previous versions this problem did not happened

@hmmftg
Copy link
Contributor Author

hmmftg commented Dec 24, 2022

un-commenting

par.MaxCharLen = len([]rune(value))

in file parameter_encode.go did fix the issue

@hmmftg hmmftg mentioned this issue Dec 25, 2022
@sijms
Copy link
Owner

sijms commented Dec 25, 2022

I will investigate the issue and find a solution

@sijms sijms closed this as completed in 3be07a3 Dec 25, 2022
sijms added a commit that referenced this issue Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants