[jOOQ/jOOQ#14300] Expand unqualified asterisk in MySQL when it's not leading
This commit is contained in:
parent
49c9f50d12
commit
632059c145
@ -37,22 +37,22 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
// ...
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.FIREBIRD;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.MARIADB;
|
||||
import static org.jooq.SQLDialect.MYSQL;
|
||||
// ...
|
||||
import static org.jooq.impl.Keywords.K_EXCEPT;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import org.jooq.Asterisk;
|
||||
import org.jooq.Context;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Function1;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.QueryPart;
|
||||
// ...
|
||||
@ -66,7 +66,7 @@ import org.jooq.impl.QOM.UnmodifiableList;
|
||||
final class AsteriskImpl extends AbstractQueryPart implements Asterisk {
|
||||
static final AsteriskImpl INSTANCE = new AsteriskImpl(new QueryPartList<>());
|
||||
static final Set<SQLDialect> SUPPORT_NATIVE_EXCEPT = SQLDialect.supportedBy(H2);
|
||||
static final Set<SQLDialect> NO_SUPPORT_UNQUALIFIED_COMBINED = SQLDialect.supportedBy(FIREBIRD);
|
||||
static final Set<SQLDialect> NO_SUPPORT_UNQUALIFIED_COMBINED = SQLDialect.supportedBy(FIREBIRD, MARIADB, MYSQL);
|
||||
final QueryPartList<Field<?>> fields;
|
||||
|
||||
private AsteriskImpl(QueryPartList<Field<?>> fields) {
|
||||
|
||||
@ -3766,7 +3766,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|
||||
// [#7841] Each iteration must contribute new fields to the result.
|
||||
// Otherwise, we couldn't resolve an asterisk, and must fall
|
||||
// back to determining fields from the ResultSetMetaData
|
||||
if (size == result.size())
|
||||
if (resolveSupported && size == result.size())
|
||||
return new SelectFieldList<>();
|
||||
else
|
||||
size = result.size();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user