-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
Add some parameter type checking for prepared statements #353
Conversation
Whenever I use anything besides `Types.DECIMAL` for number type, I get `Error: Incorrect arguments to mysqld_stmt_execute`. Related to: sidorares#348
Prevents an error when `CONCAT(?)` is used.
if (this.parameters instanceof Date) { | ||
packet.writeInt16(Types.DATETIME); | ||
} else if ( | ||
Array.isArray(this.parameter[i]) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo here s/paramerer/parameters/
Thanks @kevinmartin ! |
Any guidance? |
Unfortunately mysql server version on TravisCI does not support json ( maybe this can be overriden, but right now .travis.yml uses default setup ). Maybe you add simple select with parameters, using at least numeric and string parameter types Actually it looks like it's already covered ( with exception for JSON case ) Maybe you add your original JSON test, but wrap it with a sql check to execute only when JSON type supported? |
Whenever I use anything besides
Types.DECIMAL
for number type, I getError: Incorrect arguments to mysqld_stmt_execute
.Related to: #348