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

spider basic_sql tests with view protocol fail with mismatching found_rows() output

Details

    Description

      At the current custom branch for MDEV-35452 bb-10.5-mdev-35452 263709cafe50ce6e10c90fc4ab8b21640dd94bc8, the following tests fail with mismatching found_rows() output:

      • spider/handler.basic_sql
      • spider.basic_sql

      For example

      spider.basic_sql                         w6 [ fail ]
              Test ended at 2025-04-04 10:33:12
       
      CURRENT_TEST: spider.basic_sql
      --- /home/ycp/source/mariadb-server/10.5/src/storage/spider/mysql-test/spider/r/basic_sql.result	2023-12-15 18:00:56.175389690 +1100
      +++ /home/ycp/source/mariadb-server/10.5/src/storage/spider/mysql-test/spider/r/basic_sql.reject	2025-04-04 10:33:11.632894431 +1100
      @@ -244,7 +244,7 @@
       connection master_1;
       SELECT found_rows();
       found_rows()
      -5
      +4
       
       select high_priority
       connection master_1;
       
      Result content mismatch
      

      Further, spider/bg.basic_sql fails the same way if we apply a workaround to MDEV-36357 as in https://jira.mariadb.org/browse/MDEV-36357?focusedCommentId=302466&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-302466

      Attachments

        Issue Links

          Activity

            ycp Yuchen Pei added a comment - - edited

            Turned out spider does not support found_rows() at all and the correct output in *.basic_sql without view protocol is just a coincidence.

            Here's a simple test demonstrating this fact:

            create table t2 (c int);
            create table t1 (c int) ENGINE=Spider
            COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
            insert into t1 values (1), (2), (3), (4), (5);
            select SQL_CALC_FOUND_ROWS c from t1 order by c limit 4;
            c
            1
            2
            3
            4
            select found_rows();
            found_rows()
            1
            select SQL_CALC_FOUND_ROWS c from t2 order by c limit 4;
            c
            1
            2
            3
            4
            select found_rows();
            found_rows()
            5
            

            For this issue we should just remove the blocks containing SELECT FOUND_ROWS() statements in those tests - they are misleading.

            ycp Yuchen Pei added a comment - - edited Turned out spider does not support found_rows() at all and the correct output in *.basic_sql without view protocol is just a coincidence. Here's a simple test demonstrating this fact: create table t2 (c int); create table t1 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; insert into t1 values (1), (2), (3), (4), (5); select SQL_CALC_FOUND_ROWS c from t1 order by c limit 4; c 1 2 3 4 select found_rows(); found_rows() 1 select SQL_CALC_FOUND_ROWS c from t2 order by c limit 4; c 1 2 3 4 select found_rows(); found_rows() 5 For this issue we should just remove the blocks containing SELECT FOUND_ROWS() statements in those tests - they are misleading.
            ycp Yuchen Pei added a comment -

            Hi holyfoot, ptal thanks:

            f5ada424908 upstream/bb-10.5-mdev-36478 MDEV-36478 MDEV-35452 Remove blocks testing SELECT SQL_CALC_FOUND_ROWS from spider tests
            

            ycp Yuchen Pei added a comment - Hi holyfoot , ptal thanks: f5ada424908 upstream/bb-10.5-mdev-36478 MDEV-36478 MDEV-35452 Remove blocks testing SELECT SQL_CALC_FOUND_ROWS from spider tests
            holyfoot Alexey Botchkov added a comment -

            ok to push.

            holyfoot Alexey Botchkov added a comment - ok to push.

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              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.