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 created issue -
            ycp Yuchen Pei made changes -
            Field Original Value New Value
            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 made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            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
            ycp Yuchen Pei made changes -
            Assignee Yuchen Pei [ JIRAUSER52627 ] Alexey Botchkov [ holyfoot ]
            Status Confirmed [ 10101 ] In Review [ 10002 ]

            ok to push.

            holyfoot Alexey Botchkov added a comment - ok to push.
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Yuchen Pei [ JIRAUSER52627 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            ycp Yuchen Pei added a comment -

            Pushed 08793310fb5b46e39057ba110661dd69d0201639 to 10.5

            ycp Yuchen Pei added a comment - Pushed 08793310fb5b46e39057ba110661dd69d0201639 to 10.5
            ycp Yuchen Pei made changes -
            Fix Version/s 10.5.29 [ 29996 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.6.22 [ 29997 ]
            Fix Version/s 10.11.12 [ 29998 ]
            Fix Version/s 11.4.6 [ 29999 ]
            Fix Version/s 11.8.2 [ 30001 ]

            People

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