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

Unexpected error thrown after connection to remote server broken

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Q4/2026 Server Maintenance, Q1/2027 Server Maintenance

    Description

      Issue:

      ------
      After connection to remote server is broken due to timeout ,
      Subsequent query fails to open new connection ,uses broken connection and errors out

      MariaDB [m8]> truncate s1;
      ERROR 1296 (HY000): Got error 10000 'Error on remote system: 2006: Server has gone away' from FEDERATED

      Testcase:

      --------------
      MariaDB [m8]> UPDATE s1 a JOIN s1 b SET a.a = 1;truncate s1;truncate s1;
      ERROR 1159 (08S01): Got timeout reading communication packets
      ERROR 1296 (HY000): Got error 10000 'Error on remote system: 2006: Server has gone away' from FEDERATED
      ERROR 1159 (08S01): Got timeout reading communication packets

      Issue details:

      ---------------
      Update Query takes 10sec to execute
      Say federated server started with net_read_timeout=3
      So update query errors in 3sec bcz of timeout
      Connection to remote server is broken.
      1st Truncate -->Instead of opening new connection to remote server, Tries to re-use broken connection ,hence error's out with "Server has gone away" -->Bug ??
      2nd Truncate --Opens new connection as expected.

      Version used:

      ----------------
      Debug build
      Branch : 13.2-MDEV-41243-fedx-pushdown-assert-for-upd-del-prepared-stmts
      commit: e7d83013b31c4cc97a0003a0e58b707d94cba042
      Version : 13.1.0

      How to repeat:

      ----------------
      Slave:

      create table s1( a int);
      

      Master: Start server with federated engine enabled

      Start server with --net_read_timeout=3
      create table s1(a int)  ENGINE="FEDERATED" CONNECTION='mysql://u3:pass1@127.0.0.1:3306/m8/s1';
      insert into s1 select seq from seq_1_to_1000; 
       
      set global federated_pushdown=ON;
      UPDATE s1 a JOIN s1 b SET a.a = 1;truncate s1; //Notice "server has gone away" error
      

      Attachments

        Issue Links

          Activity

            People

              bsrikanth Srikanth Bondalapati
              mariadb-pavithrapandith Pavithra Pandith
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1d 7h 26m
                  1d 7h 26m
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.25d Time Not Required
                  0.25d

                  Git Integration

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