I set a new value for a mysql environment variable using tmycommand component created on runtime with this sql:
SET GLOBAL tmp_table_size := 2000000;
Then i run another query like:
SHOW VARIABLES LIKE 'tmp_table_size';
and get the OLD value not the recent one. (por example: 18250110)
I need to close my app and launch it again to see the new value setted. Why?
If i promp for the value from another instance of my app launched BEFORE it shows the OLD value too. It seems like only new conections can view the change made from previous conections.
Thanks in advance and sorry for my english.
mysql variables
Re: mysql variables
It's a specifity of MySQL server. MySQL Reference Manual specifies:
"The change affects the corresponding session variable only for clients that connect after the change.
The global variable change does not affect the session variable for any client that is currently connected (not even that of the client that issues the SET GLOBAL statement). "
"The change affects the corresponding session variable only for clients that connect after the change.
The global variable change does not affect the session variable for any client that is currently connected (not even that of the client that issues the SET GLOBAL statement). "
You can only close a connection by the TMyConnection.Disconnect method and open it anew by TMyConnection.Connect.rui wrote:I need to close my app and launch it again to see the new value setted.