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

RocksDB ROW_COUNT() after UPDATE always 1, even if the data has not changed.

    XMLWordPrintable

Details

    Description

      In MariaDB 10.3.16 on ROCKSDB engine ROW_COUNT() return always 1 (not 0), after UPDETE, when data not changed.
      In InnoDB always returns 0 if the data has not changed.

      DROP TABLE IF EXISTS `test`;
       
      CREATE TABLE `test`
      (
      	`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
      	`status` TINYINT UNSIGNED NOT NULL,
      	KEY(`status`)
      )
      ENGINE=ROCKSDB CHARACTER SET utf8 COLLATE utf8_general_ci;
       
      INSERT INTO `test`(`id`,`status`) VALUES (1,1),(2,2),(3,3);
       
      UPDATE `test` SET `status`=2 WHERE `id`=2;
       
      SELECT ROW_COUNT();

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            ilya Илья Индиго
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.