Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
gandalf wrote:Did you find a mysql bug report for that? Well, 5.0 is out of service, from their point of viewing ...
R.
Well I'm just using the MySQL version as provided by Netgear (NAS products) on Debian Etch that they use. I'll have to investigate if MySQL can be upgraded without breaking anything.
ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE
on our production MySQL 5.0.77 without issues (it's a RHEL 5 system)
So I need exact parameters to reproduce the effect. Please specify
- platform
- exact mysql version
- result of running the above command from mysql cli; complete error message, if any
R.
ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE
on our production MySQL 5.0.77 without issues (it's a RHEL 5 system)
So I need exact parameters to reproduce the effect. Please specify
- platform
- exact mysql version
- result of running the above command from mysql cli; complete error message, if any
R.
ReadyNAS:~# mysql cacti
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1008
Server version: 5.0.32-Debian_7etch5 Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE;
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 'USING BTREE' at line 1
Hopefully the above also contains all the version info?
Which probably means the command will now work but the above message is because I already setup the primary keys as detailed earlier in the thread by removing "USING BTREE" from the command.
ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) /*!50060 USING BTREE */
makes use of MySQL conditional comments.
It will use default index type for older versions (which should be quite fine) and force the index type of BTREE for MySQL >= 5.00.60.
So you should run this very command and post your findings
R.
ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) /*!50060 USING BTREE */
makes use of MySQL conditional comments.
It will use default index type for older versions (which should be quite fine) and force the index type of BTREE for MySQL >= 5.00.60.
So you should run this very command and post your findings
R.