| Bug #37997 | Test "max_user_connections_func" is unreliable: Relative speed varies | ||
|---|---|---|---|
| Submitted: | 9 Jul 2008 16:40 | Modified: | 14 Jul 2008 15:19 | 
| Reporter: | Joerg Bruehe | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Tests: Server | Severity: | S3 (Non-critical) | 
| Version: | 5.1.26-rc | OS: | Any | 
| Assigned to: | Horst Hunger | CPU Architecture: | Any | 
   [10 Jul 2008 14:00]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/49452 2678 Horst Hunger 2008-07-10 Fix of bug#37997. Built in a polling until disconnect disappears from the processlist.
   [10 Jul 2008 15:19]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/49469 2699 Horst Hunger 2008-07-10 Fix of Bug#37997. Polling until disconnect is not more in the processlist
   [11 Jul 2008 14:27]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/49576 2713 Gleb Shchepa 2008-07-11 minor testcase fix
   [14 Jul 2008 6:40]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/49650 2712 Horst Hunger 2008-07-11 [merge] merge of fix of Bug#37997 to 6.0.
   [14 Jul 2008 6:40]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/49651 2702 Horst Hunger 2008-07-11 [merge] Fix of Bug#37997. Polling until disconnect is not more in the processlist
   [14 Jul 2008 6:40]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/49652 2702 Horst Hunger 2008-07-11 [merge] Fix of Bug#37997. Polling until disconnect is not more in the processlist
   [14 Jul 2008 6:40]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/49653 2712 Horst Hunger 2008-07-11 [merge] merge of fix of Bug#37997 to 6.0.
   [14 Jul 2008 6:56]
   Bugs System        
  Pushed into 5.1.28
   [14 Jul 2008 6:57]
   Bugs System        
  Pushed into 6.0.6-alpha
   [14 Jul 2008 6:57]
   Bugs System        
  Pushed into 5.1.28
   [14 Jul 2008 8:04]
   Bugs System        
  Pushed into 5.1.28
   [14 Jul 2008 9:15]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/49659 2703 Gleb Shchepa 2008-07-14 Bug #37761: IN handles NULL differently for table-subquery and value-list The server returns unexpected results if a right side of the NOT IN clause consists of NULL value and some constants of the same type, for example: SELECT * FROM t WHERE NOT t.id IN (NULL, 1, 2) may return 3, 4, 5 etc if a table contains these values. The Item_func_in::val_int method has been modified: unnecessary resets of an Item_func_case::has_null field value has been moved outside of an argument comparison loop. (Also unnecessary re-initialization of the null_value field has been moved).
   [14 Jul 2008 15:19]
   Paul DuBois        
  Test case change. No changelog entry needed.
   [18 Jul 2008 9:48]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/50015 2703 Sven Sandberg 2008-07-17 BUG#38170: rpl_variables failed on pushbuild: could not sync with master Problem: the test set @@global.init_slave to garbage at a time which was not guaranteed to be after the time when the slave's SQL thread used it. That would cause the slave's SQL thread to stop in rare cases. Fix: The test does not care about the value of @@global.init_slave, except that it should be different on master and slave. Hence, we set @@global.init_slave to something that is valid SQL.
   [18 Jul 2008 9:49]
   Bugs System        
  A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/50016 2703 Sven Sandberg 2008-07-17 BUG#38170: rpl_variables failed on pushbuild: could not sync with master Problem: the test set @@global.init_slave to garbage at a time which was not guaranteed to be after the time when the slave's SQL thread used it. That would cause the slave's SQL thread to stop in rare cases. Fix: The test does not care about the value of @@global.init_slave, except that it should be different on master and slave. Hence, we set @@global.init_slave to something that is valid SQL.
   [28 Jul 2008 16:47]
   Bugs System        
  Pushed into 5.1.28 (revid:joerg@mysql.com-20080714105031-88hmr2baz5di9xej) (version source revid:joerg@mysql.com-20080714105031-88hmr2baz5di9xej) (pib:3)


Description: Detected in the build of 5.1.25-rc: ===== main.max_user_connections_func [ fail ] mysqltest: At line 77: query 'CONNECT conn6,localhost,root,,' failed: 1203: User root already has more than 'max_user_connections' active connections The result from queries just before the failure was: ** Setup ** SET @default_max_user_connections = @@max_user_connections; Set Global max_user_connections=2; '#--------------------FN_DYNVARS_114_01-------------------------#' ** Connecting conn1 using username 'root' ** ** Connecting conn2 using username 'root' ** ** Connecting conn3 using username 'root' ** ERROR 42000: User root already has more than 'max_user_connections' active connections Expected error "too many connections" ** Disconnecting conn1 ** '#--------------------FN_DYNVARS_114_02-------------------------#' Set Global max_user_connections=3; ** Connecting conn5 using username 'root' ** ** Connecting conn6 using username 'root' ** More results from queries before failure can be found in /PATH/mysql-test/var/log/max_user_connections_func.log ===== Looking at the test, I assume the disconnect of "conn1" may not have taken effect in the server's counting before the connect of "conn6" is received and checked against the limit. Occurred on 6 platforms, independent of test run ("debug" vs "normal" vs "ps"), a total of 9 times. How to repeat: Run the test (sufficiently often ?). Suggested fix: Add a short delay (which is no complete guarantee), or loop on a check of the active connections until it has gone down to 1 before doing connections "conn5" and then "conn6".