public function streamStatementEnd(&$sql, &$newLine)
 {
     # Allow dollar quoting for function declarations
     if (substr($newLine, 0, 4) == '$mw$') {
         if ($this->delimiter) {
             $this->delimiter = false;
         } else {
             $this->delimiter = ';';
         }
     }
     return parent::streamStatementEnd($sql, $newLine);
 }
	public function streamStatementEnd( &$sql, &$newLine ) {
		if ( strtoupper( substr( $newLine, 0, 9 ) ) == 'DELIMITER' ) {
			preg_match( '/^DELIMITER\s+(\S+)/', $newLine, $m );
			$this->delimiter = $m[1];
			$newLine = '';
		}
		return parent::streamStatementEnd( $sql, $newLine );
	}