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

MySqlError { ERROR 1210 (HY000): Incorrect arguments to mysqld_stmt_execute } occurs when an empty string is bound to a parameter #129

Closed
kjmrknsn opened this issue Dec 26, 2017 · 2 comments

Comments

@kjmrknsn
Copy link
Contributor

Hi, thanks for giving us such a nice crate.

I would like you to advise me something about the issue which I'm facing.

When I run the following code, I get MySqlError { ERROR 1210 (HY000): Incorrect arguments to mysqld_stmt_execute }.

pub fn update_title(transaction: &mut Transaction) -> Result<(), mysql::error::Error> {
    transaction.prep_exec(r"
        update notebook_history
        set
            title = :title
    ", params! {
        "title" => "",
    })?;

    Ok(())
}

I guess that if an empty string is bound to a parameter, such an error occurs.

Is there any way to bind an empty string to a parameter without having an error?

Thanks.

@blackbeam
Copy link
Owner

Thanks for report.
Fixed in v12.1.0

@kjmrknsn
Copy link
Contributor Author

Thanks.

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