Bug #40383 use lower cases for DELIMITER on mysqlbinlog command
Submitted: 29 Oct 2008 4:43 Modified: 2 Feb 2013 14:17
Reporter: Mikiya Okuno Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:any OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[29 Oct 2008 4:43] Mikiya Okuno
Description:
mysqlbinlog command uses DELIMITER for safety, and outputs using upper cases. However, upper case internal commands are not parsed correctly by mysql CLI when binary character set is used. The following command results in an error:

shell> mysql --default-character-set=binary -e "DELIMITER //"

Lower cases like "delimiter" will not be an error. For a better compatibility, I propose to let mysqlbinlog command to output lower case "delimiter"s.

How to repeat:
N/A

Suggested fix:
*** 990,1003 ****
       Set safe delimiter, to dump things
       like CREATE PROCEDURE safely
    */
!   fprintf(result_file, "DELIMITER /*!*/;\n");
    strcpy(print_event_info.delimiter, "/*!*/;");
  
    rc= (remote_opt ? dump_remote_log_entries(&print_event_info, logname) :
         dump_local_log_entries(&print_event_info, logname));
  
    /* Set delimiter back to semicolon */
!   fprintf(result_file, "DELIMITER ;\n");
    strcpy(print_event_info.delimiter, ";");
    return rc;
  }
--- 990,1003 ----
       Set safe delimiter, to dump things
       like CREATE PROCEDURE safely
    */
!   fprintf(result_file, "delimiter /*!*/;\n");
    strcpy(print_event_info.delimiter, "/*!*/;");
  
    rc= (remote_opt ? dump_remote_log_entries(&print_event_info, logname) :
         dump_local_log_entries(&print_event_info, logname));
  
    /* Set delimiter back to semicolon */
!   fprintf(result_file, "delimiter ;\n");
    strcpy(print_event_info.delimiter, ";");
    return rc;
  }
[29 Oct 2008 4:44] MySQL Verification Team
mysql CLI internal command problem with binary character set is filed as bug #37268.
[2 Feb 2013 14:17] MySQL Verification Team
I get no such error:

D:\build\mysql-5.6\client\Debug>mysql --default-character-set=binary -e"DELIMITER /*!*/;" -uroot --verbose

D:\build\mysql-5.6\client\Debug>
[4 Feb 2013 1:21] MySQL Verification Team
The problem seems to be a duplicate of bug #37268.