[MXS-1713] SchemaRouter unable to process SHOW DATABASES for a lot of schemas Created: 2018-03-10  Updated: 2018-03-14  Resolved: 2018-03-13

Status: Closed
Project: MariaDB MaxScale
Component/s: schemarouter
Affects Version/s: 2.2.3
Fix Version/s: 2.2.4

Type: Bug Priority: Major
Reporter: René Cannaò Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

Ubuntu 16



 Description   

If a lot of schema exists (around 1100 in my test), MaxScale reports errors like the follow, and is unable to run any query:

2018-03-10 05:56:54   error  : (42) [schemarouter] Fatal error when processing SHOW DATABASES response, closing session.
2018-03-10 05:57:49   error  : (43) [schemarouter] Fatal error when processing SHOW DATABASES response, closing session.
2018-03-10 05:58:10   error  : (44) [schemarouter] Fatal error when processing SHOW DATABASES response, closing session.
2018-03-10 05:58:51   error  : (46) [schemarouter] Fatal error when processing SHOW DATABASES response, closing session.

How to reproduce:
1) create a lot of schemas:

for i in `seq 1101 2500` ; do echo "CREATE DATABASE IF NOT EXISTS shard_$i; GRANT ALL PRIVILEGES ON shard_$i.* TO sbtest@127.0.0.1;" ; done | mysql -u root

2) configure MaxScale with schemarouter routing. For simplicity, only 1 backend was configure

3) try to connect to MaxScale and run a query:

mysql -u sbtest -psbtest -h 127.0.0.1 -P3310 --ssl-mode=disabled -NB -e "SELECT 1" shard_1500
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query



 Comments   
Comment by markus makela [ 2018-03-10 ]

Can you attach the configuration file for MaxScale?

Comment by markus makela [ 2018-03-10 ]

Managed to reproduce it, seems that the code that handled the resultset processing had a regression from 2.1.

Comment by markus makela [ 2018-03-10 ]

Please try and see if these packages solve the problem: http://max-tst-01.mariadb.com/ci-repository/2.2-markusjm-mar10/mariadb-maxscale/

Comment by markus makela [ 2018-03-13 ]

Closing as fixed.

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