Bug #82603 | sql_mode not respected and unable to set | ||
---|---|---|---|
Submitted: | 16 Aug 2016 22:38 | Modified: | 21 Sep 2016 0:19 |
Reporter: | Diego Gullo | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.7.13-0ubuntu0.16.04.2 | OS: | Ubuntu |
Assigned to: | CPU Architecture: | Any | |
Tags: | SQL_MODE |
[16 Aug 2016 22:38]
Diego Gullo
[17 Aug 2016 6:46]
Diego Gullo
Just to clarify as to why i was unable to set the sql_mode value. I tried doing it in the /etc/mysql/conf.d/mysql.conf file and I was getting no results, the value was not changed. I have been restarting mysql to test this
[17 Aug 2016 17:31]
MySQL Verification Team
I could not repeat it. It is evidently some other problem. This is the output from my session with 5.7.13: create table site (id int(11) NOT NULL AUTO_INCREMENT, created_at datetime NOT NULL, html longtext collate utf8_unicode_ci, primary key (id), key html_idx (html(4))) engine = innodb; Query OK, 0 rows affected (0.30 sec) mysql> set global sql_mode=''; Query OK, 0 rows affected (0.01 sec) mysql> insert into site (created_at, html) values ('0000-00-00 00:00:00','aaa'),('0000-00-00 00:00:00','bbbb'); Query OK, 2 rows affected (0.15 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> alter table site modify `html` longtext CHARSET utf8mb4 COLLATE utf8mb4_general_ci ; Query OK, 2 rows affected (0.54 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> drop table site; Query OK, 0 rows affected (0.14 sec)
[17 Aug 2016 22:08]
Diego Gullo
Hi Sinisa setting sql_mode to empty and removing just NO_ZERO_DATE (see step 3) is most likely the difference. Error 1292 is very specific about NO_ZERO_DATE. I have retried by removing all the ZERO specific restrictions and it is still reproducing the same error. I.E. SET GLOBAL sql_mode ='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; or SET GLOBAL sql_mode ='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Response Error Code: 1292. Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1 If i do SELECT @@GLOBAL.sql_mode; i get 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' If you think this is not the problem what else on mysql can return the error code?
[17 Aug 2016 23:34]
Diego Gullo
also tried with SET GLOBAL sql_mode =''; and i am still getting the same error
[18 Aug 2016 13:54]
MySQL Verification Team
It is hard to tell, but it has nothing to do with sql_mode. Are you using our binary ??? If not, try it out !!! If nothing helps , dump the table and load it as a single file here.
[19 Aug 2016 0:10]
Diego Gullo
as per version I am using the standard ubuntu installation, it is a upgrade from the version previously installed and available in 14.04 to now the one available in 16.04. 5.7.13-0ubuntu0.16.04.2 The database is 80+ GB of which 99.9% the site table. It is not practical to upload the whole table. if it is not the sql_mode, despite the very specific error, what can look for? If I need to use the binary i need to postpone troubleshooting for a few weeks and the data import to the new db will take a while
[19 Aug 2016 13:07]
MySQL Verification Team
We have bad experiences with binaries built by others. 80 Gb is too much for upload. Try to dump the table, restore on another machine with our binary and where sql_mode='' and then try ALTER.
[15 Sep 2016 21:52]
Diego Gullo
I have not tried binaries, i just waited for ubuntu to give another mysql update and just retried. That made no difference. Rather then binaries again i used docker (compose) to spin a mysql container and try there (official images used for reference) with this docker-compose file content mysql: image: mysql ports: - 3307:3306 #net: "host" environment: MYSQL_ROOT_PASSWORD: 'toor' MYSQL_USER: 'dev' MYSQL_PASSWORD: 'ved' MYSQL_DATABASE: 'sitecrawler' volumes: - ./dbdata:/var/lib/mysql - ./dbdumps:/tmp/dumps I have the dbdata to inspect the db files if want to mounted, the dbdumps folder to load dumps from. I hope docker can be used as a common reference to reproduce bugs. So I have also got a small version of the site table attached as a tar.gz file and with these columns I still see error 1292. Could you please try to reproduce it this way?
[15 Sep 2016 21:52]
Diego Gullo
site table dump
Attachment: error_1292.sql.tar.gz (application/gzip, text), 2.80 MiB.
[16 Sep 2016 14:44]
MySQL Verification Team
Hi! No, we can not try reproducing with Ubuntu binaries , nor with Docker. We need a full , always reproducible test case.
[18 Sep 2016 0:17]
Diego Gullo
I have reproduced it with binaries with version/file mysql-5.7.15-linux-glibc2.5-x86_64.tar.gz. The steps are not different from the original. I can only tell you what I did when i installed them. 1 ) Spin a ubuntu precise64 machine 2 ) Install binaries, as detailed at http://dev.mysql.com/doc/refman/5.7/en/binary-installation.html --- # this is just to install the client and the mysql server dependency apt-get update --fix-missing apt-get install -y libaio1 mysql-client-core-5.5 # now install server - VERSION mysql-5.7.15-linux-glibc2.5-x86_64.tar.gz groupadd mysql useradd -r -g mysql -s /bin/false mysql cd /usr/local tar zxvf /share/mysql-5.7.15-linux-glibc2.5-x86_64.tar.gz ln -s mysql-5.7.15-linux-glibc2.5-x86_64 mysql cd mysql mkdir mysql-files chmod 750 mysql-files chown -R mysql . chgrp -R mysql . bin/mysql_install_db --user=mysql # Before MySQL 5.7.6 bin/mysqld --initialize --user=mysql # MySQL 5.7.6 and up bin/mysql_ssl_rsa_setup # MySQL 5.7.6 and up chown -R root . chown -R mysql data mysql-files bin/mysqld_safe --user=mysql & # Next command is optional cp support-files/mysql.server /etc/init.d/mysql.server --- 3) Imported mysql dump after creating sitecrawler db create database sitecrawler; mysql -u root -S /tmp/mysql.sock -p sitecrawler < /share/error_1292.sql 4 ) run the original steps i have sent in my initial description Here is in command terms --- mysql> show create table site; +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | site | CREATE TABLE `site` ( `id` int(11) NOT NULL AUTO_INCREMENT, `created_at` datetime NOT NULL, `html` longtext COLLATE utf8_unicode_ci, PRIMARY KEY (`id`), KEY `html_idx` (`html`(4)), KEY `html_wix_wordpress_idx` (`html`(4)) ) ENGINE=InnoDB AUTO_INCREMENT=12158826 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> alter table site MODIFY `html` longtext CHARSET utf8mb4 COLLATE utf8mb4_general_ci; ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1 mysql> SELECT @@GLOBAL.sql_mode; +-------------------------------------------------------------------------------------------------------------------------------------------+ | @@GLOBAL.sql_mode | +-------------------------------------------------------------------------------------------------------------------------------------------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +-------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> SET GLOBAL sql_mode ='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> SELECT @@GLOBAL.sql_mode; +------------------------------------------------------------------------------------------------------------------------------+ | @@GLOBAL.sql_mode | +------------------------------------------------------------------------------------------------------------------------------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> alter table site MODIFY `html` longtext CHARSET utf8mb4 COLLATE utf8mb4_general_ci; ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1 --- Now to show you the problem, if you really cannot reproduce it, i can only zip a virtualbox virtual machine where i have run the steps on. Anything I have missed now? I am really surprised this is not obvious in other platforms or on your machines as everywhere i try i get the error.
[19 Sep 2016 12:54]
MySQL Verification Team
[arhimed@gedora sandboxes]$ ./use_all "use test; select @@version; create table site (id int(11) NOT NULL AUTO_INCREMENT, created_at datetime NOT NULL, html longtext COLLATE utf8_unicode_ci,PRIMARY KEY (id), KEY html_idx (html(4)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;" @@version 5.1.73 @@version 5.5.43-log @@version 5.6.24 @@version 5.6.27 @@version 5.7.10 [arhimed@gedora sandboxes]$ ./use_all "select @@version; SET sql_mode=''; SET GLOBAL sql_mode=''; use test; insert into site values (1,'0000-00-00 00:00:00', 'kupus salata');" @@version 5.1.73 @@version 5.5.43-log @@version 5.6.24 @@version 5.6.27 @@version 5.7.10 [arhimed@gedora sandboxes]$ ./use_all "select @@version; SET sql_mode=''; SET GLOBAL sql_mode=''; use test; select * from site;" @@version 5.1.73 id created_at html 1 0000-00-00 00:00:00 kupus salata @@version 5.5.43-log id created_at html 1 0000-00-00 00:00:00 kupus salata @@version 5.6.24 id created_at html 1 0000-00-00 00:00:00 kupus salata @@version 5.6.27 id created_at html 1 0000-00-00 00:00:00 kupus salata @@version 5.7.10 id created_at html 1 0000-00-00 00:00:00 kupus salata [arhimed@gedora sandboxes]$ [arhimed@gedora sandboxes]$ ./use_all "select @@version; SET sql_mode=''; SET GLOBAL sql_mode=''; use test; alter table site MODIFY html longtext CHARSET utf8mb4 COLLATE utf8mb4_general_ci;" @@version 5.1.73 ERROR 1115 (42000) at line 1: Unknown character set: 'utf8mb4' @@version 5.5.43-log @@version 5.6.24 @@version 5.6.27 @@version 5.7.10 [arhimed@gedora sandboxes]$ ./use_all "select @@version; SET sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; SET GLOBAL sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; use test; alter table site MODIFY html longtext CHARSET utf8mb4 COLLATE utf8mb4_general_ci;" @@version 5.1.73 ERROR 1115 (42000) at line 1: Unknown character set: 'utf8mb4' @@version 5.5.43-log @@version 5.6.24 @@version 5.6.27 @@version 5.7.10 [arhimed@gedora sandboxes]$ ./use_all "select @@version; SET sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; SET GLOBAL sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; use test; select * from site;" @@version 5.1.73 id created_at html 1 0000-00-00 00:00:00 kupus salata @@version 5.5.43-log id created_at html 1 0000-00-00 00:00:00 kupus salata @@version 5.6.24 id created_at html 1 0000-00-00 00:00:00 kupus salata @@version 5.6.27 id created_at html 1 0000-00-00 00:00:00 kupus salata @@version 5.7.10 id created_at html 1 0000-00-00 00:00:00 kupus salata [arhimed@gedora sandboxes]$ ./use_all "select @@version; SET sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; SET GLOBAL sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; use test; alter table site MODIFY html longtext CHARSET utf8mb4 COLLATE utf8mb4_general_ci;" @@version 5.1.73 ERROR 1115 (42000) at line 1: Unknown character set: 'utf8mb4' @@version 5.5.43-log @@version 5.6.24 @@version 5.6.27 @@version 5.7.10 [arhimed@gedora sandboxes]$ ./use_all "SELECT @@sql_mode;" @@sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @@sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @@sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @@sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @@sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION [arhimed@gedora sandboxes]$
[19 Sep 2016 13:49]
Diego Gullo
Could you please replicate with the test data in error_1292.sql.tar.gz instead of creating/adding a few lines of text with manual inserts?
[19 Sep 2016 13:53]
MySQL Verification Team
mysql [localhost] {msandbox} ((none)) > select @@version; +-----------+ | @@version | +-----------+ | 5.7.15 | +-----------+ 1 row in set (0.00 sec) mysql [localhost] {msandbox} ((none)) > use test; ERROR 1049 (42000): Unknown database 'test' mysql [localhost] {msandbox} ((none)) > create database test; Query OK, 1 row affected (0.00 sec) mysql [localhost] {msandbox} ((none)) > use test Database changed mysql [localhost] {msandbox} (test) > SELECT @@GLOBAL.sql_mode; +-------------------------------------------------------------------------------------------------------------------------------------------+ | @@GLOBAL.sql_mode | +-------------------------------------------------------------------------------------------------------------------------------------------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +-------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql [localhost] {msandbox} (test) > SELECT @@sql_mode; +-------------------------------------------------------------------------------------------------------------------------------------------+ | @@sql_mode | +-------------------------------------------------------------------------------------------------------------------------------------------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +-------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql [localhost] {msandbox} (test) > create table site (id int(11) NOT NULL AUTO_INCREMENT, created_at datetime NOT NULL, html longtext COLLATE utf8_unicode_ci,PRIMARY KEY (id), KEY html_idx (html(4)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; Query OK, 0 rows affected (0.36 sec) mysql [localhost] {msandbox} (test) > insert into site values (1,'0000-00-00 00:00:00', 'kupus salata'); ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1 mysql [localhost] {msandbox} (test) > set sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' -> ; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql [localhost] {msandbox} (test) > insert into site values (1,'0000-00-00 00:00:00', 'kupus salata'); Query OK, 1 row affected (0.03 sec) mysql [localhost] {msandbox} (test) > set sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Query OK, 0 rows affected (0.00 sec) mysql [localhost] {msandbox} (test) > insert into site values (2,'0000-00-00 00:00:00', 'kupus salata'); ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1 mysql [localhost] {msandbox} (test) > alter table site MODIFY `html` longtext CHARSET utf8mb4 COLLATE utf8mb4_general_ci; ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1 mysql [localhost] {msandbox} (test) > set sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' -> ; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql [localhost] {msandbox} (test) > alter table site MODIFY `html` longtext CHARSET utf8mb4 COLLATE utf8mb4_general_ci; Query OK, 1 row affected (0.58 sec) Records: 1 Duplicates: 0 Warnings: 0
[19 Sep 2016 13:57]
MySQL Verification Team
Hi, As you can see it works flawlessly. What I believe your problem is is that you are expecting that set global will change also the session variable but it will not. so for e.g. -- This sets SESSION variable (the only one you are interested really in): mysql [localhost] {msandbox} (test) > set sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Query OK, 0 rows affected (0.00 sec) mysql [localhost] {msandbox} (test) > insert into site values (2,'0000-00-00 00:00:00', 'kupus salata'); ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1 -- and as you can see the insert failed because of no_zero_date -- and now if you change the GLOBAL one to remove no_zero_date: mysql [localhost] {msandbox} (test) > set GLOBAL sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql [localhost] {msandbox} (test) > insert into site values (2,'0000-00-00 00:00:00', 'kupus salata'); ERROR 1292 (22007): Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1 mysql [localhost] {msandbox} (test) > -- it fails again, because GLOBAL does not automatically changes session variable mysql [localhost] {msandbox} (test) > select @@sql_mode; +--------------------------------------------------------------------------------------------------------------------------------- ----------+ | @@sql_mode | +--------------------------------------------------------------------------------------------------------------------------------- ----------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUB STITUTION | +--------------------------------------------------------------------------------------------------------------------------------- ----------+ 1 row in set (0.00 sec) mysql [localhost] {msandbox} (test) > select @@GLOBAL.sql_mode; +------------------------------------------------------------------------------------------------------------------------------+ | @@GLOBAL.sql_mode | +------------------------------------------------------------------------------------------------------------------------------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql [localhost] {msandbox} (test) > best regards Bogdan Kecman
[19 Sep 2016 14:04]
MySQL Verification Team
> Could you please replicate with the test data in error_1292.sql.tar.gz instead of creating/adding a few lines of text with manual inserts? It behaves 100% the same, as I said, your problem is you are setting GLOBAL variable expecting it to affect your running SESSION. It's not how that works. Change SESSION variable sql_mode and you will see that it works as expected kind regards Bogdan Kecman
[21 Sep 2016 0:19]
Diego Gullo
Bogdan thanks for that detail. I would have thought a global context was extended and affecting the session. Also it is strange that on [17 Aug 17:31], Sinisa Milivojevic was not able to reproduce when setting the global value. Anyway this is not an issue in mysql and setting the session variable works
[21 Sep 2016 10:31]
MySQL Verification Team
Hi, > I would have thought a global context > was extended and affecting the session. That is the problem you had. The global values only count for when session is created, during session when you change global values they count for session that are going to be created after that but no running (so not your current one) sessions are affected. > Also it is strange that on [17 Aug 17:31], Sinisa Milivojevic > was not able to reproduce when setting the global value. Can't say why but I didn't notice at first neither as I was not copy/pasting your code but executing my own looking at yours, and by "finger memory" I set session value and not global one :D .. then I noticed you are not setting session variable at all hence the problem is detected :) kind regards Bogdan