Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-657

mariadb_rpl_fetch() crashes when extra_data is present

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 3.3.5
    • 3.3.6
    • Replication/Binlog API
    • None
    • Windows / Linux, MySQL 8

    Description

      This bug occurs when mariadb_rpl_fetch() reads a Rows event that contains extra_data. This occurs, for example, in MySQL 8, if the table is partitioned by range.

      This code is wrong and leads to a crash:

      if (rpl_event->event.rows.extra_data_size - 2 > 0) {

      rpl_set_string_and_len(rpl_event->event.rows.extra_data, ev, rpl_event-
      >event.rows.extra_data_size - 2);

      ev+= rpl_event->event.rows.extra_data_size;

      }

      The correct code should be something like this:

      if (rpl_event->event.rows.extra_data_size - 2 > 0) {

      rpl_alloc_set_string_and_len(...);

      ev += (rpl_event->event.rows.extra_data_size - 2);

      }

      Attachments

        Activity

          People

            georg Georg Richter
            sruli.ganor Sruli Ganor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.