mirror of
https://github.com/apache/sqoop.git
synced 2025-05-04 06:10:18 +08:00
SQOOP-539. getPrimaryKeyQuery is very slow in mysql 5.0.77.
(Jhovanny via Jarek Jarcec Cecho) git-svn-id: https://svn.apache.org/repos/asf/sqoop/trunk@1370124 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
be36da3928
commit
0cef53257f
@ -69,6 +69,14 @@ protected void initOptionDefaults() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getPrimaryKeyQuery(String tableName) {
|
||||||
|
return "SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS "
|
||||||
|
+ "WHERE TABLE_SCHEMA = (" + getSchemaQuery() + ") "
|
||||||
|
+ "AND TABLE_NAME = '"+tableName+"' "
|
||||||
|
+ "AND COLUMN_KEY = 'PRI'";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getColNamesQuery(String tableName) {
|
protected String getColNamesQuery(String tableName) {
|
||||||
// Use mysql-specific hints and LIMIT to return fast
|
// Use mysql-specific hints and LIMIT to return fast
|
||||||
|
Loading…
Reference in New Issue
Block a user