MySQL server version for the correct syntax to use next to "OPTION SQL_SELECT_LIMIT = 10"

I am posting this to save another hour of hours wasted. Mysql release candidate 5.6.7-rc is undesirable. Like Dev, I usually follow as close as possible to the latest version. This caused me the debug hours of gerrit and mysql. The answer is to use a stable version. Hope this helps someone else.

Not sure about the SO protocol for doing something like this - so just submit as a question.

mysql> select VERSION(); +--------------+ | VERSION() | +--------------+ | 5.6.7-rc-log | +--------------+ 1 row in set (0.00 sec) mysql> SET OPTION SQL_SELECT_LIMIT=10; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=10' at line 1 mysql> select VERSION(); +------------+ | VERSION() | +------------+ | 5.5.28-log | +------------+ 1 row in set (0.00 sec) mysql> SET OPTION SQL_SELECT_LIMIT=10; Query OK, 0 rows affected (0.00 sec) 
+7
source share
1 answer

Older versions of MySQL used SET OPTION, but this syntax is deprecated in favor of SET without OPTION.

The syntax for SET OPTION is deprecated and was removed in version 5.6.

Instead, use SET SQL_SELECT_LIMIT=10; .

Take a look here .

Incompatible change: The deprecated OPTION modifier for the SET statement has been removed.

+7
source

All Articles