Mariadb++ crashes with "access violation reading location" on "DROP TABLE" or "CREATE TABLE"

Bug #1484458 reported by donPardon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mariadb++
New
Undecided
Unassigned

Bug Description

I'm trying to drop or create table using mariadb++ and MySQL 5.6.
I've got crash on both drop and select commands.
The reason is in result_set.cpp, in result_set::result_set(statement* statement) constructor, in function call m_fields = mysql_fetch_fields(m_result_set);
The thins is that when m_field_count is 0, mysql_stmt_result_metadata(m_statement->m_statement) returns NULL and therefore mysql_fetch_fields(m_result_set) leads to access violation.
I'm not sure that this is a bug of mariadb, perhaps mysql_stmt_result_metadata must return something, yet I think it's worth investigation.

PS. There is no default m_row(NULL) in result_set constructors.

Revision history for this message
Sylvain Rochette (sylvain-rochette) wrote : Re: [Bug 1484458] [NEW] Mariadb++ crashes with "access violation reading location" on "DROP TABLE" or "CREATE TABLE"

If the table no longer exists you need to check if it's exist at first. If
the table exist and have no row it's will not crash

Look the tests you will probably find what you need. I create and drop db
in it.

The crash append to let you know they are a problem with the database. In
the case the table does not exist it's should crash.

For the problem with the drop, I guess the problem is similar

Best regards
On Aug 13, 2015 6:20 AM, "donPardon" <email address hidden> wrote:

> Public bug reported:
>
> I'm trying to drop or create table using mariadb++ and MySQL 5.6.
> I've got crash on both drop and select commands.
> The reason is in result_set.cpp, in result_set::result_set(statement*
> statement) constructor, in function call m_fields =
> mysql_fetch_fields(m_result_set);
> The thins is that when m_field_count is 0,
> mysql_stmt_result_metadata(m_statement->m_statement) returns NULL and
> therefore mysql_fetch_fields(m_result_set) leads to access violation.
> I'm not sure that this is a bug of mariadb, perhaps
> mysql_stmt_result_metadata must return something, yet I think it's worth
> investigation.
>
> PS. There is no default m_row(NULL) in result_set constructors.
>
> ** Affects: mariadb++
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> mariadb++.
> Matching subscriptions: mariadb++-bugs
> https://bugs.launchpad.net/bugs/1484458
>
> Title:
> Mariadb++ crashes with "access violation reading location" on "DROP
> TABLE" or "CREATE TABLE"
>
> Status in mariadb++:
> New
>
> Bug description:
> I'm trying to drop or create table using mariadb++ and MySQL 5.6.
> I've got crash on both drop and select commands.
> The reason is in result_set.cpp, in result_set::result_set(statement*
> statement) constructor, in function call m_fields =
> mysql_fetch_fields(m_result_set);
> The thins is that when m_field_count is 0,
> mysql_stmt_result_metadata(m_statement->m_statement) returns NULL and
> therefore mysql_fetch_fields(m_result_set) leads to access violation.
> I'm not sure that this is a bug of mariadb, perhaps
> mysql_stmt_result_metadata must return something, yet I think it's worth
> investigation.
>
> PS. There is no default m_row(NULL) in result_set constructors.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mariadb++/+bug/1484458/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.