#591 Cannot execute query containing '|' (pipe character)

2.6.1
closed-invalid
Rob Manning
5
2007-12-07
2007-12-06
pitchum
No

The following query is now impossible to run:

select * from my_table where label = 'AA|BB'

I took a look at the MySQL server log file and here is what server received from Squirrel SQL:

071206 12:06:29 182 Query SET OPTION SQL_SELECT_LIMIT=600
182 Query select * from my_table where label = 'AA
182 Query SET OPTION SQL_SELECT_LIMIT=DEFAULT

It seems that Squirrel SQL cuts the query before sending it to the MySQL server.

More information:
* the problem doesn't occur if Squirrel SQL is started without MySQL plugin loaded (version 0.33)
* the problem occurs with versions 2.6.1 and 2.6.2 of Squirrel SQL
* the problem doesn't occur with Squirrel SQL version 2.5 with MySQL plugin 0.33 loaded
* in all cases, I use the same JDBC driver (MySQL connector 5.0.5) but I don't think

Maybe this problem is related to bug #1837288 ( mysql bitwise operators don't work)

Discussion

  • Rob Manning
    Rob Manning
    2007-12-06

    Logged In: YES
    user_id=1287991
    Originator: NO

    This is a configuration issue. MySQL plugin has a configuration tab in Global Preferences which allows you to specify what character to use as the separator for stored procedures. '|' (pipe) was used as the default as there were examples available on the web of this usage. You could change it to "/" (to be like sqlplus in Oracle) or whatever other character or string you would like to use to separate stored procedures. It obviously cannot be ";" since you could have stored procedures with many ";" in them.

    Rob

     
  • Rob Manning
    Rob Manning
    2007-12-06

    • assigned_to: nobody --> manningr
     
  • pitchum
    pitchum
    2007-12-07

    • status: open --> closed
     
  • pitchum
    pitchum
    2007-12-07

    Logged In: YES
    user_id=1437691
    Originator: YES

    That's it!
    Sorry for the mistake. It was just confusing for me since just upgrading to Squirrel SQL 2.6.1 made some of my bookmarked queries break.

    Thanks for your answer.

     
  • Rob Manning
    Rob Manning
    2007-12-07

    • status: closed --> closed-invalid
     
  • Rob Manning
    Rob Manning
    2007-12-07

    Logged In: YES
    user_id=1287991
    Originator: NO

    No problem and your welcome :) The docs for MySQL plugin need to be updated to mention this now - I wouldn't expect anyone to guess this. On the bright side, the plugin should now allow you to run stored procedure create statements :)

    Rob