From cffd2075099393d368255b0a485fda73daedeb98 Mon Sep 17 00:00:00 2001 From: Harald Aamot Date: Thu, 14 Dec 2017 13:22:17 +0100 Subject: [PATCH] Update DatabaseMetaData.java The database vendor's preferred term for "schema" actually is SCHEMA --- src/com/mysql/jdbc/DatabaseMetaData.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/com/mysql/jdbc/DatabaseMetaData.java b/src/com/mysql/jdbc/DatabaseMetaData.java index 924cf82e..889e5930 100644 --- a/src/com/mysql/jdbc/DatabaseMetaData.java +++ b/src/com/mysql/jdbc/DatabaseMetaData.java @@ -4282,12 +4282,20 @@ private void getResultsImpl(String catalog, String table, String keysComment, Li /** * What's the database vendor's preferred term for "schema"? - * + * The answer is: SCHEMA . + * see: https://dev.mysql.com/doc/refman/5.7/en/create-database.html + * *begin quote* + * CREATE SCHEMA is a synonym for CREATE DATABASE. + * *end quote * + * + * In the end it does not matter if the function returns DATABASE or SCHEMA, because SCHEMA is a synonym for DATABASE + * But at least it is the expected term from an ANSI SQL point of view + * * @return the vendor term * @throws SQLException */ public String getSchemaTerm() throws SQLException { - return ""; + return "SCHEMA"; } /**