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

why not process ha_index_or_rnd_end 's return value

    XMLWordPrintable

    Details

      Description

      #0 mdb::CMdb::rnd_end (this=0x7faaa801e490) at /data01/chuhx_mdb4/mariadb-10.4.8/storage/mdb/src/mdb/mdb.cc:735
      #1 0x00007fab4dae3795 in ha_mdb::rnd_end (this=0x7faaa801bdf8) at /data01/chuhx_mdb4/mariadb-10.4.8/storage/mdb/src/handler/ha_mdb.cc:843
      #2 0x00007fabdb7ce630 in handler::ha_rnd_end (this=0x7faaa801bdf8) at /data01/chuhx_mdb4/mariadb-10.4.8/sql/handler.h:3230
      #3 0x00007fabdb88d996 in handler::ha_index_or_rnd_end (this=0x7faaa801bdf8) at /data01/chuhx_mdb4/mariadb-10.4.8/sql/handler.h:3237
      #4 0x00007fabdc24dde0 in end_read_record (info=0x7faad47877c0) at /data01/chuhx_mdb4/mariadb-10.4.8/sql/records.cc:330
      #5 0x00007fabdbb1d1cb in mysql_update (thd=0x7faaa8000b20, table_list=0x7faaa8011890, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=0,
      ignore=false, found_return=0x7faad4787d20, updated_return=0x7faad4787de0) at /data01/chuhx_mdb4/mariadb-10.4.8/sql/sql_update.cc:1220
      #6 0x00007fabdb91f2a8 in mysql_execute_command (thd=0x7faaa8000b20) at /data01/chuhx_mdb4/mariadb-10.4.8/sql/sql_parse.cc:4387
      #7 0x00007fabdb93482c in mysql_parse (thd=0x7faaa8000b20, rawbuf=0x7faaa8011788 "update test_sharding set x=x+1 limit 2", length=38, parser_state=0x7faad4788450,
      is_com_multi=false, is_next_command=false) at /data01/chuhx_mdb4/mariadb-10.4.8/sql/sql_parse.cc:8018

      (gdb)
      end_read_record (info=0x7faad47877c0) at /data01/chuhx_mdb4/mariadb-10.4.8/sql/records.cc:331
      331 info->table=0;
      (gdb) l
      326 {
      327 if (info->table->is_created())
      328 (void) info->table->file->extra(HA_EXTRA_NO_CACHE);
      329 if (info->read_record_func != rr_quick) // otherwise quick_range does it
      330 (void) info->table->file->ha_index_or_rnd_end();
      331 info->table=0;
      332 }
      333 }

      *we designed our own engine, and rnd_end() may return error , but at records.cc:330 , it is void, so update will success even error! *
      why it is void?

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            cstarc chu huaxing
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: