vieten / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

CLIENT_INTERACTIVE should be used on connect #1132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. connect to a server where wait_timeout != interactive_timeout
2. SHOW VARIABLES

What is the expected output? What do you see instead?

wait_timeout should be the interactive_timeout value.  it is not.

What version of Sequel Pro are you using? What version of MySQL are you
connecting to on the server?
 0.9.9/5.1

Please provide any additional information below.

Sequel Pro should set the CLIENT_INTERACTIVE flag in the connection options 
before calling mysql_connect_real().

Original issue reported on code.google.com by jdruk...@gmail.com on 27 Jul 2011 at 4:46

GoogleCodeExporter commented 9 years ago
Hi Jon,

Thanks very much for filing this issue, and for your original email (which we 
were going to address!)

I think your only mistake in your patch was that you added the mysql_options 
call in the connect() function, whereas we use the (probably very misplaced) 
connectWithLogin:password:host:port:socket:.

However, in both places where a connection is made we pass in a set of options, 
which is a better place for the CLIENT_INTERACTIVE flag anyway - so I 
implemented that, which does fix the issue; this has been committed in r3369 .  
I think you were compiling builds yourself, but otherwise test builds are 
available at http://nightly.sequelpro.com/ .

Thanks again for pointing this out - a complete oversight, and should address 
reported issues like #877. :)

Original comment by rowanb@gmail.com on 27 Jul 2011 at 11:27