Skip to content

Getting incomplete_message when the database doesn't exist #488

@bruno-viva

Description

@bruno-viva

Hi!

I am not sure if this is expected behavior, but, when I do:

    boost::asio::io_context context;
    boost::mysql::any_connection connection(context);
    boost::mysql::connect_params params;
    params.server_address.emplace_host_and_port("127.0.0.1", 3306);
    params.username = "root";
    params.password = "root";
    params.database = "test";
    params.multi_queries = true;

    boost::mysql::diagnostics diagnostics;
    boost::mysql::error_code error;

    connection.connect(params, error, diagnostics);
    if (error) {
      LOG(ERROR, "Error connecting: {}. Diagnostics: {}/{}", error.what(),
          diagnostics.client_message(), diagnostics.server_message());
    }

If the database "test" doesn't exist, I get a incomplete_message error:

An incomplete message was received from the server [mysql.client:1]. Diagnostics: []/[]

I am using MySql version 8.0.35, with boost version 1.87.0.

Let me know if you need more info! Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions