pt-upgrade compatibility with MySQL 4.1.22

Hello,

I’m trying to run pt-upgrade on a mysqld 4.1.22, but it looks like some of the commands run do not exists yet in 4.1:

$ pt-upgrade h=host1,P=3306,u=XXXX,p=XXXXX --save-results /SAN/PT-TESTS/PT-RESULTS/ /SAN/mysql/log/general_log.log

#-----------------------------------------------------------------------

Logs

#-----------------------------------------------------------------------

File: /SAN/mysql/log/general_log.log
Size: 1613
DBD::mysql::db selectrow_array failed: 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 ‘’ at line 1 [for Statement “SELECT /*!50038 @@hostname */”] at /usr/bin/pt-upgrade line 10394.

indeed @@hostname doesn’t seem to be implemented yet in 4.1

Any thoughts ?

Thanks,

Hi,

I’m sorry, but Percona Toolkit is not tested or developed with 4.1 in mind, it is a too old release. As you can see, that command needs at least 5.0 to be executed. Even ignoring that query on the code I cannot guarantee that it is going to work, lot of things can fail.

Thanks Miguel,

I assumed the toolkit was compatible as there are a couple of statements mentionning 4.1 in the books:

(…)
Fixed bug 1039184: pt-upgrade error “I need a right_sth argument”
Which were stopping pt-upgrade from working on a MySQL 4.1 host.

(…)
–flush
Add FLUSH PRIVILEGES after output.
You might need this on pre-4.1.1 servers if you want to drop a user completely.
(…)
–trim
Add TRIM() to VARCHAR columns (helps when comparing 4.1 to >= 5.0).
(…)

I’ll try to overcome the problem if I can. Thanks,

OK simply by getting the host name from perl directly I can circumvent the @@hostname problem and it works good.

I understand the problem of having to maintain the code for very old versions, but on the other hand, pt-upgrade is primarily designed at upgrading old versions… So it means it is only valuable when doing short upgrading, from 5.1 to 5.6 for example, but the thing is there are still a lot of 4.1’s out there with sensitive data and that urgently need upgrade.

Thanks

Hi ,

thank you for the pointer. Which is the official way to get to this download link?
I couldn’t find it.

Best regards