title: Is there a workaround for JDBC w/liquibase and MySQL session variables & client side SQL instructions
body: <p>Slowly building a starter changeSet xml file for one of three of my employer's primary schema's.  The only show stopper has been incorporating the sizable library of MySQL stored procedures to be managed by liquibase. </p>
  
  <p>One sproc has been somewhat of a pain to deal with:  The first few statements go like</p>
  
  <pre><code>use TargetSchema;
  select "-- explanatory inline comment thats actually useful --" into vDummy;
  
  set @@session.sql_mode='TRADITIONAL' ;
  
  drop procedure if exists adm_delete_stats ;
  
  delimiter $$
  
  create procedure adm_delete_stats(
  ...rest of sproc
  </code></pre>
  
  <p>I cut out the use statement as its counter-productive, but real issue is the <code>set @@session.sql_mode</code> statement which causes an exception like</p>
  
  <pre><code> liquibase.exception.MigrationFailedException: Migration failed for change set ./foobarSchema/sprocs/adm_delete_stats.xml::1293560556-151::dward_autogen dward:
   Reason: liquibase.exception.DatabaseException: Error executing SQL ...
  </code></pre>
  
  <p>And then the <code>delimiter</code> statement is another stumbling block.</p>
  
  <p>Doing do dilligence research I found this rejected MySQL bug report <a href="http://bugs.mysql.com/bug.php?id=42318" rel="nofollow">here</a> and this MySQL forum thread that goes a little bit more in depth to the problem <a href="http://forums.mysql.com/read.php?39,130834,130834" rel="nofollow">here</a>.</p>
  
  <p>Is there anyway I can use the sproc scripts that currently exist with Liquibase or would I have to re-write several hundred stored procedures?</p>
  
  <p>I've tried createProcedure, sqlFile, and sql liquibase tags without much luck as I think the core issue is that set, delimiter, and similar SQL commands are meant to be interpreted and acted upon by the client side interpreter before being delivered to the server.</p>