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

Bug #947893 reported by leger_frederic
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Low
Daniel Nichter
2.0
Won't Fix
Undecided
Unassigned
2.1
Fix Released
Low
Daniel Nichter
2.2
Fix Released
Low
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 : http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_hostname

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

cheers
fred

--- 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

Revision history for this message
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
Revision history for this message
Daniel Nichter (daniel-nichter) wrote : Re: Tools use @@hostname without /*!50038*/

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*/
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-770

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.