You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately I don't have time to debug your issue. But you can do it yourself.
You did not say what database server you use. I will assume you use MS SQL Server. Then add new test to mssql_test.go that reproduces your issue. And then we can fix it. I am happy to review your PR.
odbc/param.go
Line 142 in f0492df
when we execute sql like this:
INSERT INTO cy (
addr,
city,
con,
coun,
ctor,
ctime,
ctype,
desc,
don,
emil,
id,
in_type,
lo,
mtme,
ne,
phe,
pal,
pe,
sale,
tus,
wie) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
_, err = st.Exec("", "", "", "", 0, 16144, "genal", "", "", "", 62199, "", "", 1614, "testtest", "", "", "", 0, "ace", "")
then we got a panic:
After debuging, we found it would be panic when our param
addr
is empty which type is[]byte
.We dig the source code and found this code should raise
out of range
exception.So we fix this just like this:
Am I right?
Thanks for your response.
The text was updated successfully, but these errors were encountered: