$conds = '';
}
- if ( $conds === '' ) {
+ if ( $conds === '' || $conds === '*' ) {
$sql = "SELECT $startOpts $fields $from $useIndex $ignoreIndex $preLimitTail";
} elseif ( is_string( $conds ) ) {
$sql = "SELECT $startOpts $fields $from $useIndex $ignoreIndex " .
* Escaping of untrusted input used in values of numeric keys should be done via
* IDatabase::addQuotes()
*
+ * Use an empty array, string, or '*' to update all rows.
+ *
* @param string|array $options
*
* Optional: Array of query options. Boolean options are specified by
"INSERT INTO insert_table " .
"(field_insert,field) " .
"SELECT field_select,field2 " .
- "FROM select_table WHERE *",
+ "FROM select_table",
"SELECT field_select AS field_insert,field2 AS field " .
- "FROM select_table WHERE * FOR UPDATE",
+ "FROM select_table FOR UPDATE",
"INSERT INTO insert_table (field_insert,field) VALUES ('0','1')"
],
[
__METHOD__
);
$this->assertLastSqlDb( implode( '; ', [
- 'SELECT field2 AS field FROM select_table WHERE * FOR UPDATE',
+ 'SELECT field2 AS field FROM select_table FOR UPDATE',
'BEGIN',
"INSERT INTO insert_table (field) VALUES ('" . implode( "'),('", range( 0, 9999 ) ) . "')",
"INSERT INTO insert_table (field) VALUES ('" . implode( "'),('", range( 10000, 19999 ) ) . "')",