/EQEmuJSM/mysql-connector-java-5.1.13/src/com/mysql/jdbc/ConnectionPropertiesImpl.java
Java | 1604 lines | 1181 code | 280 blank | 143 comment | 56 complexity | 326cd2829011b2bbeecef7a20ed7d8fc MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, Apache-2.0
Large files files are truncated, but you can click here to view the full file
- /*
- Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
- The MySQL Connector/J is licensed under the terms of the GPL,
- like most MySQL Connectors. There are special exceptions to the
- terms and conditions of the GPL as it is applied to this software,
- see the FLOSS License Exception available on mysql.com.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; version 2 of the
- License.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Â See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA
-
- */
- package com.mysql.jdbc;
- import java.io.Serializable;
- import java.io.UnsupportedEncodingException;
- import java.sql.DriverPropertyInfo;
- import java.sql.SQLException;
- import java.util.ArrayList;
- import java.util.HashMap;
- import java.util.Iterator;
- import java.util.Map;
- import java.util.Properties;
- import java.util.TreeMap;
- import javax.naming.RefAddr;
- import javax.naming.Reference;
- import javax.naming.StringRefAddr;
- import com.mysql.jdbc.log.Log;
- import com.mysql.jdbc.log.StandardLogger;
- /**
- * Represents configurable properties for Connections and DataSources. Can also
- * expose properties as JDBC DriverPropertyInfo if required as well.
- *
- * @author Mark Matthews
- * @version $Id: ConnectionProperties.java,v 1.1.2.2 2005/05/17 14:58:56
- * mmatthews Exp $
- */
- public class ConnectionPropertiesImpl implements Serializable, ConnectionProperties {
-
- private static final long serialVersionUID = 4257801713007640580L;
- class BooleanConnectionProperty extends ConnectionProperty implements Serializable {
-
- private static final long serialVersionUID = 2540132501709159404L;
- /**
- * DOCUMENT ME!
- *
- * @param propertyNameToSet
- * @param defaultValueToSet
- * @param descriptionToSet
- * DOCUMENT ME!
- * @param sinceVersionToSet
- * DOCUMENT ME!
- */
- BooleanConnectionProperty(String propertyNameToSet,
- boolean defaultValueToSet, String descriptionToSet,
- String sinceVersionToSet, String category, int orderInCategory) {
- super(propertyNameToSet, Boolean.valueOf(defaultValueToSet), null, 0,
- 0, descriptionToSet, sinceVersionToSet, category,
- orderInCategory);
- }
- /**
- * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#getAllowableValues()
- */
- String[] getAllowableValues() {
- return new String[] { "true", "false", "yes", "no" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- boolean getValueAsBoolean() {
- return ((Boolean) this.valueAsObject).booleanValue();
- }
- /**
- * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#hasValueConstraints()
- */
- boolean hasValueConstraints() {
- return true;
- }
- /**
- * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#initializeFrom(java.util.Properties)
- */
- void initializeFrom(String extractedValue) throws SQLException {
- if (extractedValue != null) {
- validateStringValues(extractedValue);
- this.valueAsObject = Boolean.valueOf(extractedValue
- .equalsIgnoreCase("TRUE") //$NON-NLS-1$
- || extractedValue.equalsIgnoreCase("YES")); //$NON-NLS-1$
- } else {
- this.valueAsObject = this.defaultValue;
- }
- }
- /**
- * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#isRangeBased()
- */
- boolean isRangeBased() {
- return false;
- }
- void setValue(boolean valueFlag) {
- this.valueAsObject = Boolean.valueOf(valueFlag);
- }
- }
- abstract class ConnectionProperty implements Serializable {
- String[] allowableValues;
- String categoryName;
- Object defaultValue;
- int lowerBound;
- int order;
- String propertyName;
- String sinceVersion;
- int upperBound;
- Object valueAsObject;
- boolean required;
-
- String description;
-
- public ConnectionProperty() {}
-
- ConnectionProperty(String propertyNameToSet, Object defaultValueToSet,
- String[] allowableValuesToSet, int lowerBoundToSet,
- int upperBoundToSet, String descriptionToSet,
- String sinceVersionToSet, String category, int orderInCategory) {
-
- this.description = descriptionToSet;
- this.propertyName = propertyNameToSet;
- this.defaultValue = defaultValueToSet;
- this.valueAsObject = defaultValueToSet;
- this.allowableValues = allowableValuesToSet;
- this.lowerBound = lowerBoundToSet;
- this.upperBound = upperBoundToSet;
- this.required = false;
- this.sinceVersion = sinceVersionToSet;
- this.categoryName = category;
- this.order = orderInCategory;
- }
- String[] getAllowableValues() {
- return this.allowableValues;
- }
- /**
- * @return Returns the categoryName.
- */
- String getCategoryName() {
- return this.categoryName;
- }
- Object getDefaultValue() {
- return this.defaultValue;
- }
- int getLowerBound() {
- return this.lowerBound;
- }
- /**
- * @return Returns the order.
- */
- int getOrder() {
- return this.order;
- }
- String getPropertyName() {
- return this.propertyName;
- }
- int getUpperBound() {
- return this.upperBound;
- }
- Object getValueAsObject() {
- return this.valueAsObject;
- }
- abstract boolean hasValueConstraints();
- void initializeFrom(Properties extractFrom) throws SQLException {
- String extractedValue = extractFrom.getProperty(getPropertyName());
- extractFrom.remove(getPropertyName());
- initializeFrom(extractedValue);
- }
- void initializeFrom(Reference ref) throws SQLException {
- RefAddr refAddr = ref.get(getPropertyName());
- if (refAddr != null) {
- String refContentAsString = (String) refAddr.getContent();
- initializeFrom(refContentAsString);
- }
- }
- abstract void initializeFrom(String extractedValue) throws SQLException;
- abstract boolean isRangeBased();
- /**
- * @param categoryName
- * The categoryName to set.
- */
- void setCategoryName(String categoryName) {
- this.categoryName = categoryName;
- }
- /**
- * @param order
- * The order to set.
- */
- void setOrder(int order) {
- this.order = order;
- }
- void setValueAsObject(Object obj) {
- this.valueAsObject = obj;
- }
- void storeTo(Reference ref) {
- if (getValueAsObject() != null) {
- ref.add(new StringRefAddr(getPropertyName(), getValueAsObject()
- .toString()));
- }
- }
- DriverPropertyInfo getAsDriverPropertyInfo() {
- DriverPropertyInfo dpi = new DriverPropertyInfo(this.propertyName, null);
- dpi.choices = getAllowableValues();
- dpi.value = (this.valueAsObject != null) ? this.valueAsObject.toString() : null;
- dpi.required = this.required;
- dpi.description = this.description;
-
- return dpi;
- }
-
- void validateStringValues(String valueToValidate) throws SQLException {
- String[] validateAgainst = getAllowableValues();
- if (valueToValidate == null) {
- return;
- }
- if ((validateAgainst == null) || (validateAgainst.length == 0)) {
- return;
- }
- for (int i = 0; i < validateAgainst.length; i++) {
- if ((validateAgainst[i] != null)
- && validateAgainst[i].equalsIgnoreCase(valueToValidate)) {
- return;
- }
- }
- StringBuffer errorMessageBuf = new StringBuffer();
- errorMessageBuf.append("The connection property '"); //$NON-NLS-1$
- errorMessageBuf.append(getPropertyName());
- errorMessageBuf.append("' only accepts values of the form: "); //$NON-NLS-1$
- if (validateAgainst.length != 0) {
- errorMessageBuf.append("'"); //$NON-NLS-1$
- errorMessageBuf.append(validateAgainst[0]);
- errorMessageBuf.append("'"); //$NON-NLS-1$
- for (int i = 1; i < (validateAgainst.length - 1); i++) {
- errorMessageBuf.append(", "); //$NON-NLS-1$
- errorMessageBuf.append("'"); //$NON-NLS-1$
- errorMessageBuf.append(validateAgainst[i]);
- errorMessageBuf.append("'"); //$NON-NLS-1$
- }
- errorMessageBuf.append(" or '"); //$NON-NLS-1$
- errorMessageBuf
- .append(validateAgainst[validateAgainst.length - 1]);
- errorMessageBuf.append("'"); //$NON-NLS-1$
- }
- errorMessageBuf.append(". The value '"); //$NON-NLS-1$
- errorMessageBuf.append(valueToValidate);
- errorMessageBuf.append("' is not in this set."); //$NON-NLS-1$
- throw SQLError.createSQLException(errorMessageBuf.toString(),
- SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
- }
- }
- class IntegerConnectionProperty extends ConnectionProperty implements Serializable {
- private static final long serialVersionUID = -3004305481796850832L;
- public IntegerConnectionProperty(String propertyNameToSet,
- Object defaultValueToSet, String[] allowableValuesToSet,
- int lowerBoundToSet, int upperBoundToSet,
- String descriptionToSet, String sinceVersionToSet,
- String category, int orderInCategory) {
- super(propertyNameToSet, defaultValueToSet, allowableValuesToSet,
- lowerBoundToSet, upperBoundToSet, descriptionToSet, sinceVersionToSet,
- category, orderInCategory);
- }
- int multiplier = 1;
- IntegerConnectionProperty(String propertyNameToSet,
- int defaultValueToSet, int lowerBoundToSet,
- int upperBoundToSet, String descriptionToSet,
- String sinceVersionToSet, String category, int orderInCategory) {
- super(propertyNameToSet, new Integer(defaultValueToSet), null,
- lowerBoundToSet, upperBoundToSet, descriptionToSet,
- sinceVersionToSet, category, orderInCategory);
- }
- /**
- * DOCUMENT ME!
- *
- * @param propertyNameToSet
- * @param defaultValueToSet
- * @param descriptionToSet
- * @param sinceVersionToSet
- * DOCUMENT ME!
- */
- IntegerConnectionProperty(String propertyNameToSet,
- int defaultValueToSet, String descriptionToSet,
- String sinceVersionToSet, String category, int orderInCategory) {
- this(propertyNameToSet, defaultValueToSet, 0, 0, descriptionToSet,
- sinceVersionToSet, category, orderInCategory);
- }
- /**
- * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getAllowableValues()
- */
- String[] getAllowableValues() {
- return null;
- }
- /**
- * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getLowerBound()
- */
- int getLowerBound() {
- return this.lowerBound;
- }
- /**
- * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getUpperBound()
- */
- int getUpperBound() {
- return this.upperBound;
- }
- int getValueAsInt() {
- return ((Integer) this.valueAsObject).intValue();
- }
- /**
- * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#hasValueConstraints()
- */
- boolean hasValueConstraints() {
- return false;
- }
- /**
- * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#initializeFrom(java.lang.String)
- */
- void initializeFrom(String extractedValue) throws SQLException {
- if (extractedValue != null) {
- try {
- // Parse decimals, too
- int intValue = Double.valueOf(extractedValue).intValue();
- /*
- * if (isRangeBased()) { if ((intValue < getLowerBound()) ||
- * (intValue > getUpperBound())) { throw new
- * SQLException("The connection property '" +
- * getPropertyName() + "' only accepts integer values in the
- * range of " + getLowerBound() + " - " + getUpperBound() + ",
- * the value '" + extractedValue + "' exceeds this range.",
- * SQLError.SQL_STATE_ILLEGAL_ARGUMENT); } }
- */
- this.valueAsObject = new Integer(intValue * multiplier);
- } catch (NumberFormatException nfe) {
- throw SQLError.createSQLException("The connection property '" //$NON-NLS-1$
- + getPropertyName()
- + "' only accepts integer values. The value '" //$NON-NLS-1$
- + extractedValue
- + "' can not be converted to an integer.", //$NON-NLS-1$
- SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
- }
- } else {
- this.valueAsObject = this.defaultValue;
- }
- }
- /**
- * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#isRangeBased()
- */
- boolean isRangeBased() {
- return getUpperBound() != getLowerBound();
- }
- void setValue(int valueFlag) {
- this.valueAsObject = new Integer(valueFlag);
- }
- }
-
- public class LongConnectionProperty extends IntegerConnectionProperty {
- private static final long serialVersionUID = 6068572984340480895L;
- LongConnectionProperty(String propertyNameToSet,
- long defaultValueToSet, long lowerBoundToSet,
- long upperBoundToSet, String descriptionToSet,
- String sinceVersionToSet, String category, int orderInCategory) {
- super(propertyNameToSet, new Long(defaultValueToSet), null,
- (int)lowerBoundToSet, (int)upperBoundToSet, descriptionToSet,
- sinceVersionToSet, category, orderInCategory);
- }
-
- LongConnectionProperty(String propertyNameToSet,
- long defaultValueToSet, String descriptionToSet,
- String sinceVersionToSet, String category, int orderInCategory) {
- this(propertyNameToSet,
- defaultValueToSet, 0,
- 0, descriptionToSet,
- sinceVersionToSet, category, orderInCategory);
- }
-
- void setValue(long value) {
- this.valueAsObject = new Long(value);
- }
-
- long getValueAsLong() {
- return ((Long) this.valueAsObject).longValue();
- }
-
- void initializeFrom(String extractedValue) throws SQLException {
- if (extractedValue != null) {
- try {
- // Parse decimals, too
- long longValue = Double.valueOf(extractedValue).longValue();
- this.valueAsObject = new Long(longValue);
- } catch (NumberFormatException nfe) {
- throw SQLError.createSQLException("The connection property '" //$NON-NLS-1$
- + getPropertyName()
- + "' only accepts long integer values. The value '" //$NON-NLS-1$
- + extractedValue
- + "' can not be converted to a long integer.", //$NON-NLS-1$
- SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
- }
- } else {
- this.valueAsObject = this.defaultValue;
- }
- }
- }
-
- class MemorySizeConnectionProperty extends IntegerConnectionProperty implements Serializable {
- private static final long serialVersionUID = 7351065128998572656L;
- private String valueAsString;
-
- MemorySizeConnectionProperty(String propertyNameToSet,
- int defaultValueToSet, int lowerBoundToSet,
- int upperBoundToSet, String descriptionToSet,
- String sinceVersionToSet, String category, int orderInCategory) {
- super(propertyNameToSet, defaultValueToSet, lowerBoundToSet,
- upperBoundToSet, descriptionToSet, sinceVersionToSet,
- category, orderInCategory);
- }
- void initializeFrom(String extractedValue) throws SQLException {
- valueAsString = extractedValue;
-
- if (extractedValue != null) {
- if (extractedValue.endsWith("k") //$NON-NLS-1$
- || extractedValue.endsWith("K") //$NON-NLS-1$
- || extractedValue.endsWith("kb") //$NON-NLS-1$
- || extractedValue.endsWith("Kb") //$NON-NLS-1$
- || extractedValue.endsWith("kB")) { //$NON-NLS-1$
- multiplier = 1024;
- int indexOfK = StringUtils.indexOfIgnoreCase(
- extractedValue, "k"); //$NON-NLS-1$
- extractedValue = extractedValue.substring(0, indexOfK);
- } else if (extractedValue.endsWith("m") //$NON-NLS-1$
- || extractedValue.endsWith("M") //$NON-NLS-1$
- || extractedValue.endsWith("G") //$NON-NLS-1$
- || extractedValue.endsWith("mb") //$NON-NLS-1$
- || extractedValue.endsWith("Mb") //$NON-NLS-1$
- || extractedValue.endsWith("mB")) { //$NON-NLS-1$
- multiplier = 1024 * 1024;
- int indexOfM = StringUtils.indexOfIgnoreCase(
- extractedValue, "m"); //$NON-NLS-1$
- extractedValue = extractedValue.substring(0, indexOfM);
- } else if (extractedValue.endsWith("g") //$NON-NLS-1$
- || extractedValue.endsWith("G") //$NON-NLS-1$
- || extractedValue.endsWith("gb") //$NON-NLS-1$
- || extractedValue.endsWith("Gb") //$NON-NLS-1$
- || extractedValue.endsWith("gB")) { //$NON-NLS-1$
- multiplier = 1024 * 1024 * 1024;
- int indexOfG = StringUtils.indexOfIgnoreCase(
- extractedValue, "g"); //$NON-NLS-1$
- extractedValue = extractedValue.substring(0, indexOfG);
- }
- }
- super.initializeFrom(extractedValue);
- }
- void setValue(String value) throws SQLException {
- initializeFrom(value);
- }
-
- String getValueAsString() {
- return valueAsString;
- }
- }
- class StringConnectionProperty extends ConnectionProperty implements Serializable {
-
- private static final long serialVersionUID = 5432127962785948272L;
- StringConnectionProperty(String propertyNameToSet,
- String defaultValueToSet, String descriptionToSet,
- String sinceVersionToSet, String category, int orderInCategory) {
- this(propertyNameToSet, defaultValueToSet, null, descriptionToSet,
- sinceVersionToSet, category, orderInCategory);
- }
- /**
- * DOCUMENT ME!
- *
- * @param propertyNameToSet
- * @param defaultValueToSet
- * @param allowableValuesToSet
- * @param descriptionToSet
- * @param sinceVersionToSet
- * DOCUMENT ME!
- */
- StringConnectionProperty(String propertyNameToSet,
- String defaultValueToSet, String[] allowableValuesToSet,
- String descriptionToSet, String sinceVersionToSet,
- String category, int orderInCategory) {
- super(propertyNameToSet, defaultValueToSet, allowableValuesToSet,
- 0, 0, descriptionToSet, sinceVersionToSet, category,
- orderInCategory);
- }
- String getValueAsString() {
- return (String) this.valueAsObject;
- }
- /**
- * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#hasValueConstraints()
- */
- boolean hasValueConstraints() {
- return (this.allowableValues != null)
- && (this.allowableValues.length > 0);
- }
- /**
- * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#initializeFrom(java.util.Properties)
- */
- void initializeFrom(String extractedValue) throws SQLException {
- if (extractedValue != null) {
- validateStringValues(extractedValue);
- this.valueAsObject = extractedValue;
- } else {
- this.valueAsObject = this.defaultValue;
- }
- }
- /**
- * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#isRangeBased()
- */
- boolean isRangeBased() {
- return false;
- }
- void setValue(String valueFlag) {
- this.valueAsObject = valueFlag;
- }
- }
- private static final String CONNECTION_AND_AUTH_CATEGORY = Messages.getString("ConnectionProperties.categoryConnectionAuthentication"); //$NON-NLS-1$
- private static final String NETWORK_CATEGORY = Messages.getString("ConnectionProperties.categoryNetworking"); //$NON-NLS-1$
-
- private static final String DEBUGING_PROFILING_CATEGORY = Messages.getString("ConnectionProperties.categoryDebuggingProfiling"); //$NON-NLS-1$
- private static final String HA_CATEGORY = Messages.getString("ConnectionProperties.categorryHA"); //$NON-NLS-1$
- private static final String MISC_CATEGORY = Messages.getString("ConnectionProperties.categoryMisc"); //$NON-NLS-1$
- private static final String PERFORMANCE_CATEGORY = Messages.getString("ConnectionProperties.categoryPerformance"); //$NON-NLS-1$
-
- private static final String SECURITY_CATEGORY = Messages.getString("ConnectionProperties.categorySecurity"); //$NON-NLS-1$
-
- private static final String[] PROPERTY_CATEGORIES = new String[] {
- CONNECTION_AND_AUTH_CATEGORY, NETWORK_CATEGORY,
- HA_CATEGORY, SECURITY_CATEGORY,
- PERFORMANCE_CATEGORY, DEBUGING_PROFILING_CATEGORY, MISC_CATEGORY };
-
- private static final ArrayList PROPERTY_LIST = new ArrayList();
- //
- // Yes, this looks goofy, but we're trying to avoid intern()ing here
- //
- private static final String STANDARD_LOGGER_NAME = StandardLogger.class.getName();
- protected static final String ZERO_DATETIME_BEHAVIOR_CONVERT_TO_NULL = "convertToNull"; //$NON-NLS-1$
- protected static final String ZERO_DATETIME_BEHAVIOR_EXCEPTION = "exception"; //$NON-NLS-1$
- protected static final String ZERO_DATETIME_BEHAVIOR_ROUND = "round"; //$NON-NLS-1$
- static {
- try {
- java.lang.reflect.Field[] declaredFields = ConnectionPropertiesImpl.class
- .getDeclaredFields();
- for (int i = 0; i < declaredFields.length; i++) {
- if (ConnectionPropertiesImpl.ConnectionProperty.class
- .isAssignableFrom(declaredFields[i].getType())) {
- PROPERTY_LIST.add(declaredFields[i]);
- }
- }
- } catch (Exception ex) {
- RuntimeException rtEx = new RuntimeException();
- rtEx.initCause(ex);
-
- throw rtEx;
- }
- }
- public ExceptionInterceptor getExceptionInterceptor() {
- return null;
- }
-
- /**
- * Exposes all ConnectionPropertyInfo instances as DriverPropertyInfo
- *
- * @param info
- * the properties to load into these ConnectionPropertyInfo
- * instances
- * @param slotsToReserve
- * the number of DPI slots to reserve for 'standard' DPI
- * properties (user, host, password, etc)
- * @return a list of all ConnectionPropertyInfo instances, as
- * DriverPropertyInfo
- * @throws SQLException
- * if an error occurs
- */
- protected static DriverPropertyInfo[] exposeAsDriverPropertyInfo(
- Properties info, int slotsToReserve) throws SQLException {
- return (new ConnectionPropertiesImpl() {
- }).exposeAsDriverPropertyInfoInternal(info, slotsToReserve);
- }
- private BooleanConnectionProperty allowLoadLocalInfile = new BooleanConnectionProperty(
- "allowLoadLocalInfile", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.loadDataLocal"), //$NON-NLS-1$
- "3.0.3", SECURITY_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty allowMultiQueries = new BooleanConnectionProperty(
- "allowMultiQueries", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.allowMultiQueries"), //$NON-NLS-1$
- "3.1.1", SECURITY_CATEGORY, 1); //$NON-NLS-1$
- private BooleanConnectionProperty allowNanAndInf = new BooleanConnectionProperty(
- "allowNanAndInf", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.allowNANandINF"), //$NON-NLS-1$
- "3.1.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty allowUrlInLocalInfile = new BooleanConnectionProperty(
- "allowUrlInLocalInfile", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.allowUrlInLoadLocal"), //$NON-NLS-1$
- "3.1.4", SECURITY_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty alwaysSendSetIsolation = new BooleanConnectionProperty(
- "alwaysSendSetIsolation", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.alwaysSendSetIsolation"), //$NON-NLS-1$
- "3.1.7", PERFORMANCE_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty autoClosePStmtStreams = new BooleanConnectionProperty(
- "autoClosePStmtStreams", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.autoClosePstmtStreams"), //$NON-NLS-1$
- "3.1.12", //$NON-NLS-1$
- MISC_CATEGORY,
- Integer.MIN_VALUE);
-
- private BooleanConnectionProperty autoDeserialize = new BooleanConnectionProperty(
- "autoDeserialize", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.autoDeserialize"), //$NON-NLS-1$
- "3.1.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty autoGenerateTestcaseScript = new BooleanConnectionProperty(
- "autoGenerateTestcaseScript", false, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.autoGenerateTestcaseScript"), "3.1.9", //$NON-NLS-1$ //$NON-NLS-2$
- DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
- private boolean autoGenerateTestcaseScriptAsBoolean = false;
- private BooleanConnectionProperty autoReconnect = new BooleanConnectionProperty(
- "autoReconnect", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.autoReconnect"), //$NON-NLS-1$
- "1.1", HA_CATEGORY, 0); //$NON-NLS-1$
- private BooleanConnectionProperty autoReconnectForPools = new BooleanConnectionProperty(
- "autoReconnectForPools", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.autoReconnectForPools"), //$NON-NLS-1$
- "3.1.3", HA_CATEGORY, 1); //$NON-NLS-1$
- private boolean autoReconnectForPoolsAsBoolean = false;
- private MemorySizeConnectionProperty blobSendChunkSize = new MemorySizeConnectionProperty(
- "blobSendChunkSize", //$NON-NLS-1$
- 1024 * 1024,
- 1,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.blobSendChunkSize"), //$NON-NLS-1$
- "3.1.9", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty autoSlowLog = new BooleanConnectionProperty(
- "autoSlowLog", true,
- Messages.getString("ConnectionProperties.autoSlowLog"),
- "5.1.4", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
-
- private BooleanConnectionProperty blobsAreStrings = new BooleanConnectionProperty(
- "blobsAreStrings", false,
- "Should the driver always treat BLOBs as Strings - specifically to work around dubious metadata "
- + "returned by the server for GROUP BY clauses?",
- "5.0.8", MISC_CATEGORY, Integer.MIN_VALUE);
- private BooleanConnectionProperty functionsNeverReturnBlobs = new BooleanConnectionProperty(
- "functionsNeverReturnBlobs", false,
- "Should the driver always treat data from functions returning BLOBs as Strings - specifically to work around dubious metadata "
- + "returned by the server for GROUP BY clauses?",
- "5.0.8", MISC_CATEGORY, Integer.MIN_VALUE);
-
- private BooleanConnectionProperty cacheCallableStatements = new BooleanConnectionProperty(
- "cacheCallableStmts", false, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.cacheCallableStatements"), //$NON-NLS-1$
- "3.1.2", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty cachePreparedStatements = new BooleanConnectionProperty(
- "cachePrepStmts", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.cachePrepStmts"), //$NON-NLS-1$
- "3.0.10", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty cacheResultSetMetadata = new BooleanConnectionProperty(
- "cacheResultSetMetadata", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.cacheRSMetadata"), //$NON-NLS-1$
- "3.1.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private boolean cacheResultSetMetaDataAsBoolean;
- private BooleanConnectionProperty cacheServerConfiguration = new BooleanConnectionProperty(
- "cacheServerConfiguration", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.cacheServerConfiguration"), //$NON-NLS-1$
- "3.1.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private IntegerConnectionProperty callableStatementCacheSize = new IntegerConnectionProperty(
- "callableStmtCacheSize", //$NON-NLS-1$
- 100,
- 0,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.callableStmtCacheSize"), //$NON-NLS-1$
- "3.1.2", PERFORMANCE_CATEGORY, 5); //$NON-NLS-1$
- private BooleanConnectionProperty capitalizeTypeNames = new BooleanConnectionProperty(
- "capitalizeTypeNames", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.capitalizeTypeNames"), //$NON-NLS-1$
- "2.0.7", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private StringConnectionProperty characterEncoding = new StringConnectionProperty(
- "characterEncoding", //$NON-NLS-1$
- null,
- Messages.getString("ConnectionProperties.characterEncoding"), //$NON-NLS-1$
- "1.1g", MISC_CATEGORY, 5); //$NON-NLS-1$
- private String characterEncodingAsString = null;
- private StringConnectionProperty characterSetResults = new StringConnectionProperty(
- "characterSetResults", null, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.characterSetResults"), "3.0.13", //$NON-NLS-1$ //$NON-NLS-2$
- MISC_CATEGORY, 6);
-
- private StringConnectionProperty clientInfoProvider = new StringConnectionProperty(
- "clientInfoProvider", "com.mysql.jdbc.JDBC4CommentClientInfoProvider", //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("ConnectionProperties.clientInfoProvider"), //$NON-NLS-1$
- "5.1.0", //$NON-NLS-1$
- DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
-
- private BooleanConnectionProperty clobberStreamingResults = new BooleanConnectionProperty(
- "clobberStreamingResults", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.clobberStreamingResults"), //$NON-NLS-1$
- "3.0.9", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private StringConnectionProperty clobCharacterEncoding = new StringConnectionProperty(
- "clobCharacterEncoding", //$NON-NLS-1$
- null,
- Messages.getString("ConnectionProperties.clobCharacterEncoding"), //$NON-NLS-1$
- "5.0.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty compensateOnDuplicateKeyUpdateCounts = new BooleanConnectionProperty(
- "compensateOnDuplicateKeyUpdateCounts",
- false,
- Messages.getString("ConnectionProperties.compensateOnDuplicateKeyUpdateCounts"),
- "5.1.7", MISC_CATEGORY, Integer.MIN_VALUE);
- private StringConnectionProperty connectionCollation = new StringConnectionProperty(
- "connectionCollation", //$NON-NLS-1$
- null,
- Messages.getString("ConnectionProperties.connectionCollation"), //$NON-NLS-1$
- "3.0.13", MISC_CATEGORY, 7); //$NON-NLS-1$
- private StringConnectionProperty connectionLifecycleInterceptors = new StringConnectionProperty(
- "connectionLifecycleInterceptors", //$NON-NLS-1$
- null,
- Messages.getString("ConnectionProperties.connectionLifecycleInterceptors"),
- "5.1.4", CONNECTION_AND_AUTH_CATEGORY, Integer.MAX_VALUE);
- private IntegerConnectionProperty connectTimeout = new IntegerConnectionProperty(
- "connectTimeout", 0, 0, Integer.MAX_VALUE, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.connectTimeout"), //$NON-NLS-1$
- "3.0.1", CONNECTION_AND_AUTH_CATEGORY, 9); //$NON-NLS-1$
- private BooleanConnectionProperty continueBatchOnError = new BooleanConnectionProperty(
- "continueBatchOnError", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.continueBatchOnError"), //$NON-NLS-1$
- "3.0.3", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty createDatabaseIfNotExist = new BooleanConnectionProperty(
- "createDatabaseIfNotExist", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.createDatabaseIfNotExist"), //$NON-NLS-1$
- "3.1.9", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private IntegerConnectionProperty defaultFetchSize = new IntegerConnectionProperty("defaultFetchSize", 0, Messages.getString("ConnectionProperties.defaultFetchSize"), "3.1.9", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private BooleanConnectionProperty detectServerPreparedStmts = new BooleanConnectionProperty(
- "useServerPrepStmts", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.useServerPrepStmts"), //$NON-NLS-1$
- "3.1.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty dontTrackOpenResources = new BooleanConnectionProperty(
- "dontTrackOpenResources", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.dontTrackOpenResources"), "3.1.7", PERFORMANCE_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
- Integer.MIN_VALUE);
- private BooleanConnectionProperty dumpQueriesOnException = new BooleanConnectionProperty(
- "dumpQueriesOnException", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.dumpQueriesOnException"), //$NON-NLS-1$
- "3.1.3", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty dynamicCalendars = new BooleanConnectionProperty(
- "dynamicCalendars", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.dynamicCalendars"), //$NON-NLS-1$
- "3.1.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty elideSetAutoCommits = new BooleanConnectionProperty(
- "elideSetAutoCommits", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.eliseSetAutoCommit"), //$NON-NLS-1$
- "3.1.3", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty emptyStringsConvertToZero = new BooleanConnectionProperty(
- "emptyStringsConvertToZero", true, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.emptyStringsConvertToZero"), "3.1.8", //$NON-NLS-1$ //$NON-NLS-2$
- MISC_CATEGORY, Integer.MIN_VALUE);
- private BooleanConnectionProperty emulateLocators = new BooleanConnectionProperty(
- "emulateLocators", false, Messages.getString("ConnectionProperties.emulateLocators"), "3.1.0", MISC_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Integer.MIN_VALUE);
- private BooleanConnectionProperty emulateUnsupportedPstmts = new BooleanConnectionProperty(
- "emulateUnsupportedPstmts", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.emulateUnsupportedPstmts"), //$NON-NLS-1$
- "3.1.7", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty enablePacketDebug = new BooleanConnectionProperty(
- "enablePacketDebug", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.enablePacketDebug"), //$NON-NLS-1$
- "3.1.3", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty enableQueryTimeouts = new BooleanConnectionProperty(
- "enableQueryTimeouts", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.enableQueryTimeouts"), //$NON-NLS-1$
- "5.0.6", //$NON-NLS-1$
- PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
-
- private BooleanConnectionProperty explainSlowQueries = new BooleanConnectionProperty(
- "explainSlowQueries", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.explainSlowQueries"), //$NON-NLS-1$
- "3.1.2", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private StringConnectionProperty exceptionInterceptors = new StringConnectionProperty(
- "exceptionInterceptors", //$NON-NLS-1$
- null,
- Messages.getString("ConnectionProperties.exceptionInterceptors"),
- "5.1.8", MISC_CATEGORY, Integer.MIN_VALUE);
-
- /** When failed-over, set connection to read-only? */
- private BooleanConnectionProperty failOverReadOnly = new BooleanConnectionProperty(
- "failOverReadOnly", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.failoverReadOnly"), //$NON-NLS-1$
- "3.0.12", HA_CATEGORY, 2); //$NON-NLS-1$
- private BooleanConnectionProperty gatherPerformanceMetrics = new BooleanConnectionProperty(
- "gatherPerfMetrics", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.gatherPerfMetrics"), //$NON-NLS-1$
- "3.1.2", DEBUGING_PROFILING_CATEGORY, 1); //$NON-NLS-1$
- private BooleanConnectionProperty generateSimpleParameterMetadata = new BooleanConnectionProperty(
- "generateSimpleParameterMetadata", false, Messages.getString("ConnectionProperties.generateSimpleParameterMetadata"), "5.0.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private boolean highAvailabilityAsBoolean = false;
- private BooleanConnectionProperty holdResultsOpenOverStatementClose = new BooleanConnectionProperty(
- "holdResultsOpenOverStatementClose", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.holdRSOpenOverStmtClose"), //$NON-NLS-1$
- "3.1.7", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty includeInnodbStatusInDeadlockExceptions = new BooleanConnectionProperty(
- "includeInnodbStatusInDeadlockExceptions",
- false,
- "Include the output of \"SHOW ENGINE INNODB STATUS\" in exception messages when deadlock exceptions are detected?",
- "5.0.7", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
-
- private BooleanConnectionProperty ignoreNonTxTables = new BooleanConnectionProperty(
- "ignoreNonTxTables", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.ignoreNonTxTables"), //$NON-NLS-1$
- "3.0.9", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private IntegerConnectionProperty initialTimeout = new IntegerConnectionProperty(
- "initialTimeout", 2, 1, Integer.MAX_VALUE, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.initialTimeout"), //$NON-NLS-1$
- "1.1", HA_CATEGORY, 5); //$NON-NLS-1$
- private BooleanConnectionProperty isInteractiveClient = new BooleanConnectionProperty(
- "interactiveClient", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.interactiveClient"), //$NON-NLS-1$
- "3.1.0", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty jdbcCompliantTruncation = new BooleanConnectionProperty(
- "jdbcCompliantTruncation", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.jdbcCompliantTruncation"), "3.1.2", MISC_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
- Integer.MIN_VALUE);
- private boolean jdbcCompliantTruncationForReads =
- this.jdbcCompliantTruncation.getValueAsBoolean();
-
- protected MemorySizeConnectionProperty largeRowSizeThreshold = new MemorySizeConnectionProperty("largeRowSizeThreshold",
- 2048, 0, Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.largeRowSizeThreshold"),
- "5.1.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
-
- private StringConnectionProperty loadBalanceStrategy = new StringConnectionProperty(
- "loadBalanceStrategy", //$NON-NLS-1$
- "random", //$NON-NLS-1$
- null, //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("ConnectionProperties.loadBalanceStrategy"), //$NON-NLS-1$
- "5.0.6", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private IntegerConnectionProperty loadBalanceBlacklistTimeout = new IntegerConnectionProperty(
- "loadBalanceBlacklistTimeout", 0, //$NON-NLS-1$
- 0, Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.loadBalanceBlacklistTimeout"), //$NON-NLS-1$
- "5.1.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private IntegerConnectionProperty loadBalancePingTimeout = new IntegerConnectionProperty(
- "loadBalancePingTimeout", 0, //$NON-NLS-1$
- 0, Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.loadBalancePingTimeout"), //$NON-NLS-1$
- "5.1.13", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty loadBalanceValidateConnectionOnSwapServer = new BooleanConnectionProperty(
- "loadBalanceValidateConnectionOnSwapServer",
- false,
- Messages.getString("ConnectionProperties.loadBalanceValidateConnectionOnSwapServer"), //$NON-NLS-1$
- "5.1.13", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private StringConnectionProperty loadBalanceConnectionGroup = new StringConnectionProperty(
- "loadBalanceConnectionGroup", //$NON-NLS-1$
- null, //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("ConnectionProperties.loadBalanceConnectionGroup"), //$NON-NLS-1$
- "5.1.13", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private StringConnectionProperty loadBalanceExceptionChecker = new StringConnectionProperty(
- "loadBalanceExceptionChecker", //$NON-NLS-1$
- "com.mysql.jdbc.StandardLoadBalanceExceptionChecker", //$NON-NLS-1$
- null, //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("ConnectionProperties.loadBalanceExceptionChecker"), //$NON-NLS-1$
- "5.1.13", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private StringConnectionProperty loadBalanceSQLStateFailover = new StringConnectionProperty(
- "loadBalanceSQLStateFailover", //$NON-NLS-1$
- null, //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("ConnectionProperties.loadBalanceSQLStateFailover"), //$NON-NLS-1$
- "5.1.13", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private StringConnectionProperty loadBalanceSQLExceptionSubclassFailover = new StringConnectionProperty(
- "loadBalanceSQLExceptionSubclassFailover", //$NON-NLS-1$
- null, //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("ConnectionProperties.loadBalanceSQLExceptionSubclassFailover"), //$NON-NLS-1$
- "5.1.13", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty loadBalanceEnableJMX = new BooleanConnectionProperty(
- "loadBalanceEnableJMX", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.loadBalanceEnableJMX"), //$NON-NLS-1$
- "5.1.13", MISC_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
-
-
- private StringConnectionProperty localSocketAddress = new StringConnectionProperty("localSocketAddress", //$NON-NLS-1$
- null, Messages.getString("ConnectionProperties.localSocketAddress"), //$NON-NLS-1$
- "5.0.5", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private MemorySizeConnectionProperty locatorFetchBufferSize = new MemorySizeConnectionProperty(
- "locatorFetchBufferSize", //$NON-NLS-1$
- 1024 * 1024,
- 0,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.locatorFetchBufferSize"), //$NON-NLS-1$
- "3.2.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private StringConnectionProperty loggerClassName = new StringConnectionProperty(
- "logger", STANDARD_LOGGER_NAME, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.logger", new Object[] {Log.class.getName(), STANDARD_LOGGER_NAME}), //$NON-NLS-1$
- "3.1.1", DEBUGING_PROFILING_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
- 0);
- private BooleanConnectionProperty logSlowQueries = new BooleanConnectionProperty(
- "logSlowQueries", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.logSlowQueries"), //$NON-NLS-1$
- "3.1.2", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty logXaCommands = new BooleanConnectionProperty(
- "logXaCommands", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.logXaCommands"), //$NON-NLS-1$
- "5.0.5", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty maintainTimeStats = new BooleanConnectionProperty(
- "maintainTimeStats", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.maintainTimeStats"), "3.1.9", PERFORMANCE_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
- Integer.MAX_VALUE);
- private boolean maintainTimeStatsAsBoolean = true;
- private IntegerConnectionProperty maxQuerySizeToLog = new IntegerConnectionProperty(
- "maxQuerySizeToLog", //$NON-NLS-1$
- 2048,
- 0,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.maxQuerySizeToLog"), //$NON-NLS-1$
- "3.1.3", DEBUGING_PROFILING_CATEGORY, 4); //$NON-NLS-1$
- private IntegerConnectionProperty maxReconnects = new IntegerConnectionProperty(
- "maxReconnects", //$NON-NLS-1$
- 3,
- 1,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.maxReconnects"), //$NON-NLS-1$
- "1.1", HA_CATEGORY, 4); //$NON-NLS-1$
- private IntegerConnectionProperty retriesAllDown = new IntegerConnectionProperty(
- "retriesAllDown", //$NON-NLS-1$
- 120,
- 0,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.retriesAllDown"), //$NON-NLS-1$
- "5.1.6", HA_CATEGORY, 4); //$NON-NLS-1$
- private IntegerConnectionProperty maxRows = new IntegerConnectionProperty(
- "maxRows", -1, -1, Integer.MAX_VALUE, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.maxRows"), //$NON-NLS-1$
- Messages.getString("ConnectionProperties.allVersions"), MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private int maxRowsAsInt = -1;
- private IntegerConnectionProperty metadataCacheSize = new IntegerConnectionProperty(
- "metadataCacheSize", //$NON-NLS-1$
- 50,
- 1,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.metadataCacheSize"), //$NON-NLS-1$
- "3.1.1", PERFORMANCE_CATEGORY, 5); //$NON-NLS-1$
-
- private IntegerConnectionProperty netTimeoutForStreamingResults = new IntegerConnectionProperty(
- "netTimeoutForStreamingResults", 600, //$NON-NLS-1$
- 0, Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.netTimeoutForStreamingResults"), //$NON-NLS-1$
- "5.1.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty noAccessToProcedureBodies = new BooleanConnectionProperty(
- "noAccessToProcedureBodies",
- false,
- "When determining procedure parameter types for CallableStatements, and the connected user "
- + " can't access procedure bodies through \"SHOW CREATE PROCEDURE\" or select on mysql.proc "
- + " should the driver instead create basic metadata (all parameters reported as IN VARCHARs,"
- + " but allowing registerOutParameter() to be called on them anyway) instead "
- + " of throwing an exception?",
- "5.0.3", MISC_CATEGORY, Integer.MIN_VALUE);
-
- private BooleanConnectionProperty noDatetimeStringSync = new BooleanConnectionProperty(
- "noDatetimeStringSync", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.noDatetimeStringSync"), //$NON-NLS-1$
- "3.1.7", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty noTimezoneConversionForTimeType = new BooleanConnectionProperty(
- "noTimezoneConversionForTimeType", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.noTzConversionForTimeType"), //$NON-NLS-1$
- "5.0.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty nullCatalogMeansCurrent = new BooleanConnectionProperty(
- "nullCatalogMeansCurrent", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.nullCatalogMeansCurrent"), //$NON-NLS-1$
- "3.1.8", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty nullNamePatternMatchesAll = new BooleanConnectionProperty(
- "nullNamePatternMatchesAll", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.nullNamePatternMatchesAll"), //$NON-NLS-1$
- "3.1.8", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private IntegerConnectionProperty packetDebugBufferSize = new IntegerConnectionProperty(
- "packetDebugBufferSize", //$NON-NLS-1$
- 20,
- 0,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.packetDebugBufferSize"), //$NON-NLS-1$
- "3.1.3", DEBUGING_PROFILING_CATEGORY, 7); //$NON-NLS-1$
-
- private BooleanConnectionProperty padCharsWithSpace = new BooleanConnectionProperty(
- "padCharsWithSpace", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.padCharsWithSpace"), //$NON-NLS-1$
- "5.0.6", //$NON-NLS-1$
- MISC_CATEGORY,
- Integer.MIN_VALUE);
- private BooleanConnectionProperty paranoid = new BooleanConnectionProperty(
- "paranoid", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.paranoid"), //$NON-NLS-1$
- "3.0.1", SECURITY_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private BooleanConnectionProperty pedantic = new BooleanConnectionProperty(
- "pedantic", false, Messages.getString("ConnectionProperties.pedantic"), "3.0.0", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- MISC_CATEGORY, Integer.MIN_VALUE);
- private BooleanConnectionProperty pinGlobalTxToPhysicalConnection = new BooleanConnectionProperty(
- "pinGlobalTxToPhysicalConnection", false, Messages.getString("ConnectionProperties.pinGlobalTxToPhysicalConnection"), //$NON-NLS-1$
- "5.0.1", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private BooleanConnectionProperty populateInsertRowWithDefaultValues = new BooleanConnectionProperty(
- "populateInsertRowWithDefaultValues", false, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.populateInsertRowWithDefaultValues"), //$NON-NLS-1$
- "5.0.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private IntegerConnectionProperty preparedStatementCacheSize = new IntegerConnectionProperty(
- "prepStmtCacheSize", 25, 0, Integer.MAX_VALUE, //$NON-NLS-1$
- Messages.getString("ConnectionProperties.prepStmtCacheSize"), //$NON-NLS-1$
- "3.0.10", PERFORMANCE_CATEGORY, 10); //$NON-NLS-1$
- private IntegerConnectionProperty preparedStatementCacheSqlLimit = new IntegerConnectionProperty(
- "prepStmtCacheSqlLimit", //$NON-NLS-1$
- 256,
- 1,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.prepStmtCacheSqlLimit"), //$NON-NLS-1$
- "3.0.10", PERFORMANCE_CATEGORY, 11); //$NON-NLS-1$
- private BooleanConnectionProperty processEscapeCodesForPrepStmts =
- new BooleanConnectionProperty("processEscapeCodesForPrepStmts", //$NON-NLS-1$
- true,
- Messages.getString("ConnectionProperties.processEscapeCodesForPrepStmts"), //$NON-NLS-1$
- "3.1.12", //$NON-NLS-1$
- MISC_CATEGORY, Integer.MIN_VALUE);
-
- private StringConnectionProperty profilerEventHandler = new StringConnectionProperty(
- "profilerEventHandler",
- "com.mysql.jdbc.profiler.LoggingProfilerEventHandler",
- Messages.getString("ConnectionProperties.profilerEventHandler"),
- "5.1.6", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
-
- private StringConnectionProperty profileSql = new StringConnectionProperty(
- "profileSql", //$NON-NLS-1$
- null,
- Messages.getString("ConnectionProperties.profileSqlDeprecated"), //$NON-NLS-1$
- "2.0.14", DEBUGING_PROFILING_CATEGORY, 3); //$NON-NLS-1$
- private BooleanConnectionProperty profileSQL = new BooleanConnectionProperty(
- "profileSQL", //$NON-NLS-1$
- false,
- Messages.getString("ConnectionProperties.profileSQL"), //$NON-NLS-1$
- "3.1.0", DEBUGING_PROFILING_CATEGORY, 1); //$NON-NLS-1$
- private boolean profileSQLAsBoolean = false;
- private StringConnectionProperty propertiesTransform = new StringConnectionProperty(
- NonRegisteringDriver.PROPERTIES_TRANSFORM_KEY,
- null,
- Messages.getString("ConnectionProperties.connectionPropertiesTransform"), //$NON-NLS-1$
- "3.1.4", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
- private IntegerConnectionProperty queriesBeforeRetryMaster = new IntegerConnectionProperty(
- "queriesBeforeRetryMaster", //$NON-NLS-1$
- 50,
- 1,
- Integer.MAX_VALUE,
- Messages.getString("ConnectionProperties.queriesBeforeRetryMaster"), //$NON-NLS-1$
- "3.0.2", HA_CATEGORY, 7); //$NON-NLS-1$
- private BooleanConnectionProperty queryTimeoutKill…
Large files files are truncated, but you can click here to view the full file