35 return "CAST( $field AS BINARY )";
43 return 'CAST( ' . $field .
' AS SIGNED )';
47 switch ( strtoupper( $joinType ) ) {
50 return 'STRAIGHT_JOIN';
53 return parent::normalizeJoinType( $joinType );
62 return "FORCE INDEX (" . $this->
indexName( $index ) .
")";
70 return "IGNORE INDEX (" . $this->
indexName( $index ) .
")";
78 $delTable = $this->
tableName( $delTable );
79 $joinTable = $this->
tableName( $joinTable );
80 $sql =
"DELETE $delTable FROM $delTable, $joinTable WHERE $delVar=$joinVar ";
82 if ( $conds !=
'*' ) {
83 $sql .=
' AND ' . $this->
makeList( $conds, self::LIST_AND );
90 return parent::isTransactableQuery( $sql ) &&
92 !preg_match(
'/^SELECT\s+(GET|RELEASE|IS_FREE)_LOCK\(/', $sql->
getSQL() );
103 return "VALUES($column)";
107 $encName = $this->quoter->addQuotes( $this->
makeLockName( $lockName ) );
112 return "SELECT IF(GET_LOCK($encName,$timeout),UNIX_TIMESTAMP(SYSDATE(6)),NULL) AS acquired";
116 $encName = $this->quoter->addQuotes( $this->
makeLockName( $lockName ) );
117 return "SELECT IS_FREE_LOCK($encName) AS unlocked";
121 $encName = $this->quoter->addQuotes( $this->
makeLockName( $lockName ) );
122 return "SELECT RELEASE_LOCK($encName) AS released";
128 return ( strlen( $lockName ) > 64 ) ? sha1( $lockName ) : $lockName;