[MXS-2042] Hang with multistatment queries Created: 2018-09-11  Updated: 2018-09-14  Resolved: 2018-09-12

Status: Closed
Project: MariaDB MaxScale
Component/s: Protocol
Affects Version/s: 2.2.12
Fix Version/s: 2.2.14

Type: Bug Priority: Major
Reporter: dapeng huang Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

Run following sql in a multistatment manner, sometimes it will hang

select name from t1 where id = 1; select name from t1 where id = 3; select name from t1 where id = 2

We found the problem is here, mysql_backend.c:826

 if (collecting_resultset(proto, capabilities))
            {
                if (expecting_resultset(proto))
                {
                    if (mxs_mysql_is_result_set(read_buffer))
                    {
                        bool more = false;
                        if (modutil_count_signal_packets(read_buffer, 0, &more, NULL) != 2)
                        {
                            dcb_readq_prepend(dcb, read_buffer);
                            return 0;
                        }
                    }
 
                    // Collected the complete result
                    proto->collect_result = false;
                    result_collected = true;
                }

If all results returned in one gwbuf, then modutil_count_signal_packets will return 6 not 2, it is not easy to reproduce it;



 Comments   
Comment by dapeng huang [ 2018-09-11 ]

https://github.com/mariadb-corporation/MaxScale/pull/180

Comment by markus makela [ 2018-09-11 ]

The pull request does fix a real problem but the query does not enter that part of the code.

Generated at Thu Feb 08 04:11:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.