Some tools use @@hostname without /*!50038*/

Bug #947893 reported by leger_frederic on 2012-03-06
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to
Fix Released
Daniel Nichter
Won't Fix
Fix Released
Daniel Nichter
Fix Released
Daniel Nichter

Bug Description

We do use the following mysql-server version :

Server version: 5.0.32-Debian_7etch12-log Debian etch distribution

When trying to run pt-table-checksum the following error arise :

03-06T12:10:03 DBD::mysql::db selectrow_array failed: Unknown system variable 'hostname' [for Statement "SELECT @@hostname, @@server_id"] at /usr/bin/pt-table-checksum line 1480.

Looking at the code, it's obvious that @@hostname must be defined to succeed :

   my $sql = 'SELECT @@hostname, @@server_id';
   PTDEBUG && _d($dbh, $sql);
   my ($hostname, $server_id) = $dbh->selectrow_array($sql);
   PTDEBUG && _d($dbh, 'hostname:', $hostname, $server_id);
   if ( $hostname ) {
      $self->{hostname} = $hostname;

You can see here that this was added in version 5.0.38 :

Can you add a way to override this hostname check ? maybe passing it through a command line switch.


--- infos ---
command line : pt-table-checksum h=my-master-server,u=root,p=password
version : pt-table-checksum 2.0.3
mysql-server-version : 5.0.32-Debian_7etch12-log Debian etch distribution

Related branches

Baron Schwartz (baron-xaprb) wrote :

We can think of a way to work around this. But, frankly, most people should not be running such an old version of 5.0 anymore. It is horribly buggy and has severe performance problems. I haven't seen any 5.0 servers older than 5.0.51a in a couple of years and it's certainly not a popular version to use. So, this is relatively low priority for us (unless you have a support contract which entitles you to a fix).

Changed in percona-toolkit:
status: New → Confirmed
importance: Undecided → Wishlist
summary: - pt-table-checksum use @@hostname system variable which is not defined in
- all mysql versions
+ Tools use @@hostname without /*!50038*/
tags: added: all-tools connection

We're fixing this because we support MySQL 5.0 and since we don't say "only > 5.0.38", so we'll support 5.0.*.

summary: - Tools use @@hostname without /*!50038*/
+ Some tools use @@hostname without /*!50038*/

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers