Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15539

Issuing a warning while inserting crashes the server

    XMLWordPrintable

Details

    Description

      This occured while testing a new fix:

      CREATE TABLE `t1` (
        `id` int(10) NOT NULL,
        `name` varchar(32) DEFAULT NULL,
        `title` char(16) DEFAULT NULL,
        `salary` decimal(12,2) DEFAULT NULL
      ) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='jdbc:postgresql://localhost/test?user=postgres&password=tinono' `TABLE_TYPE`='JDBC' `TABNAME`='public.employee';
      

      When executing:

      INSERT INTO t1 VALUES(3126,'Smith', 'Clerk', 5230.00);
      

      It raised an assert failure in Diagnostics_area::set_ok_status on line:

        DBUG_ASSERT(!is_set() || (m_status == DA_OK_BULK && is_bulk_op()));
      

      It was apparently because a warning was issued by CONNECT.

      To try to reproduce on the present version, edit tabdos.cpp. In TDBDOS::OpenDB and after:

        if (Mode == MODE_INSERT) {
      

      add the lines:

              strcpy(g->Message, "Whatever");
      	PushWarning(g, this, 1);
      

      After recompiling, execute:

      drop table t1;
      create table t1 (n int, m varchar(16)) engine=connect;
      select * from t1;
      insert into t1 values(1,'One');
      

      This does not affect MariaDB 10.1 but only MariaDB 10.2.

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            bertrandop Olivier Bertrand
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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