source: Ballon/out/artifacts/geisa_artifact/WEB-INF/lib/mysql-connector-java-5.1.21/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java

Last change on this file was 766, checked in by npipsl, 11 years ago
File size: 71.0 KB
Line 
1/*
2 Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
3 
4
5  The MySQL Connector/J is licensed under the terms of the GPLv2
6  <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
7  There are special exceptions to the terms and conditions of the GPLv2 as it is applied to
8  this software, see the FLOSS License Exception
9  <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
10
11  This program is free software; you can redistribute it and/or modify it under the terms
12  of the GNU General Public License as published by the Free Software Foundation; version 2
13  of the License.
14
15  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  See the GNU General Public License for more details.
18
19  You should have received a copy of the GNU General Public License along with this
20  program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth
21  Floor, Boston, MA 02110-1301  USA
22
23
24
25 */
26package com.mysql.jdbc.jdbc2.optional;
27
28import java.lang.reflect.Constructor;
29import java.sql.SQLException;
30import java.sql.Savepoint;
31import java.sql.Statement;
32import java.util.Map;
33import java.util.Properties;
34import java.util.TimeZone;
35import java.util.concurrent.Executor;
36
37import com.mysql.jdbc.Connection;
38import com.mysql.jdbc.ExceptionInterceptor;
39import com.mysql.jdbc.Extension;
40import com.mysql.jdbc.MySQLConnection;
41import com.mysql.jdbc.MysqlErrorNumbers;
42import com.mysql.jdbc.SQLError;
43import com.mysql.jdbc.Util;
44import com.mysql.jdbc.log.Log;
45
46/**
47 * This class serves as a wrapper for the org.gjt.mm.mysql.jdbc2.Connection
48 * class. It is returned to the application server which may wrap it again and
49 * then return it to the application client in response to
50 * dataSource.getConnection().
51 *
52 * <p>
53 * All method invocations are forwarded to org.gjt.mm.mysql.jdbc2.Connection
54 * unless the close method was previously called, in which case a sqlException
55 * is thrown. The close method performs a 'logical close' on the connection.
56 * </p>
57 *
58 * <p>
59 * All sqlExceptions thrown by the physical connection are intercepted and sent
60 * to connectionEvent listeners before being thrown to client.
61 * </p>
62 *
63 * @author Todd Wolff todd.wolff_at_prodigy.net
64 *
65 * @see org.gjt.mm.mysql.jdbc2.Connection
66 * @see org.gjt.mm.mysql.jdbc2.optional.MysqlPooledConnection
67 */
68public class ConnectionWrapper extends WrapperBase implements Connection {
69        protected Connection mc = null;
70
71        private String invalidHandleStr = "Logical handle no longer valid";
72
73        private boolean closed;
74
75        private boolean isForXa;
76
77        private static final Constructor<?> JDBC_4_CONNECTION_WRAPPER_CTOR;
78
79        static {
80                if (Util.isJdbc4()) {
81                        try {
82                                JDBC_4_CONNECTION_WRAPPER_CTOR = Class.forName(
83                                                "com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper")
84                                                .getConstructor(
85                                                                new Class[] { MysqlPooledConnection.class,
86                                                                                Connection.class, Boolean.TYPE });
87                        } catch (SecurityException e) {
88                                throw new RuntimeException(e);
89                        } catch (NoSuchMethodException e) {
90                                throw new RuntimeException(e);
91                        } catch (ClassNotFoundException e) {
92                                throw new RuntimeException(e);
93                        }
94                } else {
95                        JDBC_4_CONNECTION_WRAPPER_CTOR = null;
96                }
97        }
98
99        protected static ConnectionWrapper getInstance(
100                        MysqlPooledConnection mysqlPooledConnection,
101                        Connection mysqlConnection, boolean forXa) throws SQLException {
102                if (!Util.isJdbc4()) {
103                        return new ConnectionWrapper(mysqlPooledConnection,
104                                        mysqlConnection, forXa);
105                }
106
107                return (ConnectionWrapper) Util.handleNewInstance(
108                                JDBC_4_CONNECTION_WRAPPER_CTOR, new Object[] {
109                                                mysqlPooledConnection, mysqlConnection,
110                                                Boolean.valueOf(forXa) }, mysqlPooledConnection.getExceptionInterceptor());
111        }
112
113        /**
114         * Construct a new LogicalHandle and set instance variables
115         *
116         * @param mysqlPooledConnection
117         *            reference to object that instantiated this object
118         * @param mysqlConnection
119         *            physical connection to db
120         *
121         * @throws SQLException
122         *             if an error occurs.
123         */
124        public ConnectionWrapper(MysqlPooledConnection mysqlPooledConnection,
125                        Connection mysqlConnection, boolean forXa) throws SQLException {
126                super(mysqlPooledConnection);
127               
128                this.mc = mysqlConnection;
129                this.closed = false;
130                this.isForXa = forXa;
131
132                if (this.isForXa) {
133                        setInGlobalTx(false);
134                }
135        }
136
137        /**
138         * Passes call to method on physical connection instance. Notifies listeners
139         * of any caught exceptions before re-throwing to client.
140         *
141         * @see java.sql.Connection#setAutoCommit
142         */
143        public void setAutoCommit(boolean autoCommit) throws SQLException {
144                checkClosed();
145
146                if (autoCommit && isInGlobalTx()) {
147                        throw SQLError.createSQLException(
148                                        "Can't set autocommit to 'true' on an XAConnection",
149                                        SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION,
150                                        MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor);
151                }
152
153                try {
154                        this.mc.setAutoCommit(autoCommit);
155                } catch (SQLException sqlException) {
156                        checkAndFireConnectionError(sqlException);
157                }
158        }
159
160        /**
161         * Passes call to method on physical connection instance. Notifies listeners
162         * of any caught exceptions before re-throwing to client.
163         *
164         * @see java.sql.Connection#getAutoCommit()
165         */
166        public boolean getAutoCommit() throws SQLException {
167                checkClosed();
168
169                try {
170                        return this.mc.getAutoCommit();
171                } catch (SQLException sqlException) {
172                        checkAndFireConnectionError(sqlException);
173                }
174
175                return false; // we don't reach this code, compiler can't tell
176        }
177
178        /**
179         * Passes call to method on physical connection instance. Notifies listeners
180         * of any caught exceptions before re-throwing to client.
181         *
182         * @see java.sql.Connection#setCatalog()
183         */
184        public void setCatalog(String catalog) throws SQLException {
185                checkClosed();
186
187                try {
188                        this.mc.setCatalog(catalog);
189                } catch (SQLException sqlException) {
190                        checkAndFireConnectionError(sqlException);
191                }
192        }
193
194        /**
195         * Passes call to method on physical connection instance. Notifies listeners
196         * of any caught exceptions before re-throwing to client.
197         *
198         * @return the current catalog
199         *
200         * @throws SQLException
201         *             if an error occurs
202         */
203        public String getCatalog() throws SQLException {
204                checkClosed();
205
206                try {
207                        return this.mc.getCatalog();
208                } catch (SQLException sqlException) {
209                        checkAndFireConnectionError(sqlException);
210                }
211
212                return null; // we don't reach this code, compiler can't tell
213        }
214
215        /**
216         * Passes call to method on physical connection instance. Notifies listeners
217         * of any caught exceptions before re-throwing to client.
218         *
219         * @see java.sql.Connection#isClosed()
220         */
221        public boolean isClosed() throws SQLException {
222                return (this.closed || this.mc.isClosed());
223        }
224
225        public boolean isMasterConnection() {
226                return this.mc.isMasterConnection();
227        }
228
229        /**
230         * @see Connection#setHoldability(int)
231         */
232        public void setHoldability(int arg0) throws SQLException {
233                checkClosed();
234
235                try {
236                        this.mc.setHoldability(arg0);
237                } catch (SQLException sqlException) {
238                        checkAndFireConnectionError(sqlException);
239                }
240        }
241
242        /**
243         * @see Connection#getHoldability()
244         */
245        public int getHoldability() throws SQLException {
246                checkClosed();
247
248                try {
249                        return this.mc.getHoldability();
250                } catch (SQLException sqlException) {
251                        checkAndFireConnectionError(sqlException);
252                }
253
254                return Statement.CLOSE_CURRENT_RESULT; // we don't reach this code,
255                // compiler can't tell
256        }
257
258        /**
259         * Allows clients to determine how long this connection has been idle.
260         *
261         * @return how long the connection has been idle.
262         */
263        public long getIdleFor() {
264                return this.mc.getIdleFor();
265        }
266
267        /**
268         * Passes call to method on physical connection instance. Notifies listeners
269         * of any caught exceptions before re-throwing to client.
270         *
271         * @return a metadata instance
272         *
273         * @throws SQLException
274         *             if an error occurs
275         */
276        public java.sql.DatabaseMetaData getMetaData() throws SQLException {
277                checkClosed();
278
279                try {
280                        return this.mc.getMetaData();
281                } catch (SQLException sqlException) {
282                        checkAndFireConnectionError(sqlException);
283                }
284
285                return null; // we don't reach this code, compiler can't tell
286        }
287
288        /**
289         * Passes call to method on physical connection instance. Notifies listeners
290         * of any caught exceptions before re-throwing to client.
291         *
292         * @see java.sql.Connection#setReadOnly()
293         */
294        public void setReadOnly(boolean readOnly) throws SQLException {
295                checkClosed();
296
297                try {
298                        this.mc.setReadOnly(readOnly);
299                } catch (SQLException sqlException) {
300                        checkAndFireConnectionError(sqlException);
301                }
302        }
303
304        /**
305         * Passes call to method on physical connection instance. Notifies listeners
306         * of any caught exceptions before re-throwing to client.
307         *
308         * @see java.sql.Connection#isReadOnly()
309         */
310        public boolean isReadOnly() throws SQLException {
311                checkClosed();
312
313                try {
314                        return this.mc.isReadOnly();
315                } catch (SQLException sqlException) {
316                        checkAndFireConnectionError(sqlException);
317                }
318
319                return false; // we don't reach this code, compiler can't tell
320        }
321
322        /**
323         * @see Connection#setSavepoint()
324         */
325        public java.sql.Savepoint setSavepoint() throws SQLException {
326                checkClosed();
327
328                if (isInGlobalTx()) {
329                        throw SQLError.createSQLException(
330                                        "Can't set autocommit to 'true' on an XAConnection",
331                                        SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION,
332                                        MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor);
333                }
334
335                try {
336                        return this.mc.setSavepoint();
337                } catch (SQLException sqlException) {
338                        checkAndFireConnectionError(sqlException);
339                }
340
341                return null; // we don't reach this code, compiler can't tell
342        }
343
344        /**
345         * @see Connection#setSavepoint(String)
346         */
347        public java.sql.Savepoint setSavepoint(String arg0) throws SQLException {
348                checkClosed();
349
350                if (isInGlobalTx()) {
351                        throw SQLError.createSQLException(
352                                        "Can't set autocommit to 'true' on an XAConnection",
353                                        SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION,
354                                        MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor);
355                }
356
357                try {
358                        return this.mc.setSavepoint(arg0);
359                } catch (SQLException sqlException) {
360                        checkAndFireConnectionError(sqlException);
361                }
362
363                return null; // we don't reach this code, compiler can't tell
364        }
365
366        /**
367         * Passes call to method on physical connection instance. Notifies listeners
368         * of any caught exceptions before re-throwing to client.
369         *
370         * @see java.sql.Connection#setTransactionIsolation()
371         */
372        public void setTransactionIsolation(int level) throws SQLException {
373                checkClosed();
374
375                try {
376                        this.mc.setTransactionIsolation(level);
377                } catch (SQLException sqlException) {
378                        checkAndFireConnectionError(sqlException);
379                }
380        }
381
382        /**
383         * Passes call to method on physical connection instance. Notifies listeners
384         * of any caught exceptions before re-throwing to client.
385         *
386         * @see java.sql.Connection#getTransactionIsolation()
387         */
388        public int getTransactionIsolation() throws SQLException {
389                checkClosed();
390
391                try {
392                        return this.mc.getTransactionIsolation();
393                } catch (SQLException sqlException) {
394                        checkAndFireConnectionError(sqlException);
395                }
396
397                return TRANSACTION_REPEATABLE_READ; // we don't reach this code,
398                // compiler can't tell
399        }
400
401
402        /**
403         * Passes call to method on physical connection instance. Notifies listeners
404         * of any caught exceptions before re-throwing to client.
405         *
406         * @see java.sql.Connection#getTypeMap()
407         */
408        public java.util.Map<String, Class<?>> getTypeMap() throws SQLException {
409                checkClosed();
410
411                try {
412                        return this.mc.getTypeMap();
413                } catch (SQLException sqlException) {
414                        checkAndFireConnectionError(sqlException);
415                }
416
417                return null; // we don't reach this code, compiler can't tell
418        }
419
420        /**
421         * Passes call to method on physical connection instance. Notifies listeners
422         * of any caught exceptions before re-throwing to client.
423         *
424         * @see java.sql.Connection#getWarnings
425         */
426        public java.sql.SQLWarning getWarnings() throws SQLException {
427                checkClosed();
428
429                try {
430                        return this.mc.getWarnings();
431                } catch (SQLException sqlException) {
432                        checkAndFireConnectionError(sqlException);
433                }
434
435                return null; // we don't reach this code, compiler can't tell
436        }
437
438        /**
439         * Passes call to method on physical connection instance. Notifies listeners
440         * of any caught exceptions before re-throwing to client.
441         *
442         * @throws SQLException
443         *             if an error occurs
444         */
445        public void clearWarnings() throws SQLException {
446                checkClosed();
447
448                try {
449                        this.mc.clearWarnings();
450                } catch (SQLException sqlException) {
451                        checkAndFireConnectionError(sqlException);
452                }
453        }
454
455        /**
456         * The physical connection is not actually closed. the physical connection
457         * is closed when the application server calls
458         * mysqlPooledConnection.close(). this object is de-referenced by the pooled
459         * connection each time mysqlPooledConnection.getConnection() is called by
460         * app server.
461         *
462         * @throws SQLException
463         *             if an error occurs
464         */
465        public void close() throws SQLException {
466                close(true);
467        }
468
469        /**
470         * Passes call to method on physical connection instance. Notifies listeners
471         * of any caught exceptions before re-throwing to client.
472         *
473         * @throws SQLException
474         *             if an error occurs
475         */
476        public void commit() throws SQLException {
477                checkClosed();
478
479                if (isInGlobalTx()) {
480                        throw SQLError
481                                        .createSQLException(
482                                                        "Can't call commit() on an XAConnection associated with a global transaction",
483                                                        SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION,
484                                                        MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor);
485                }
486
487                try {
488                        this.mc.commit();
489                } catch (SQLException sqlException) {
490                        checkAndFireConnectionError(sqlException);
491                }
492        }
493
494        /**
495         * Passes call to method on physical connection instance. Notifies listeners
496         * of any caught exceptions before re-throwing to client.
497         *
498         * @see java.sql.Connection#createStatement()
499         */
500        public java.sql.Statement createStatement() throws SQLException {
501                checkClosed();
502
503                try {
504                        return StatementWrapper.getInstance(this, this.pooledConnection, this.mc
505                                        .createStatement());
506                } catch (SQLException sqlException) {
507                        checkAndFireConnectionError(sqlException);
508                }
509
510                return null; // we don't reach this code, compiler can't tell
511        }
512
513        /**
514         * Passes call to method on physical connection instance. Notifies listeners
515         * of any caught exceptions before re-throwing to client.
516         *
517         * @see java.sql.Connection#createStatement()
518         */
519        public java.sql.Statement createStatement(int resultSetType,
520                        int resultSetConcurrency) throws SQLException {
521                checkClosed();
522
523                try {
524                        return StatementWrapper.getInstance(this, this.pooledConnection, this.mc
525                                        .createStatement(resultSetType, resultSetConcurrency));
526                } catch (SQLException sqlException) {
527                        checkAndFireConnectionError(sqlException);
528                }
529
530                return null; // we don't reach this code, compiler can't tell
531        }
532
533        /**
534         * @see Connection#createStatement(int, int, int)
535         */
536        public java.sql.Statement createStatement(int arg0, int arg1, int arg2)
537                        throws SQLException {
538                checkClosed();
539
540                try {
541                        return StatementWrapper.getInstance(this, this.pooledConnection, this.mc
542                                        .createStatement(arg0, arg1, arg2));
543                } catch (SQLException sqlException) {
544                        checkAndFireConnectionError(sqlException);
545                }
546
547                return null; // we don't reach this code, compiler can't tell
548        }
549
550        /**
551         * Passes call to method on physical connection instance. Notifies listeners
552         * of any caught exceptions before re-throwing to client.
553         *
554         * @see java.sql.Connection#nativeSQL()
555         */
556        public String nativeSQL(String sql) throws SQLException {
557                checkClosed();
558
559                try {
560                        return this.mc.nativeSQL(sql);
561                } catch (SQLException sqlException) {
562                        checkAndFireConnectionError(sqlException);
563                }
564
565                return null; // we don't reach this code, compiler can't tell
566        }
567
568        /**
569         * Passes call to method on physical connection instance. Notifies listeners
570         * of any caught exceptions before re-throwing to client.
571         *
572         * @see java.sql.Connection#prepareCall()
573         */
574        public java.sql.CallableStatement prepareCall(String sql)
575                        throws SQLException {
576                checkClosed();
577
578                try {
579                        return CallableStatementWrapper.getInstance(this, this.pooledConnection, this.mc
580                                        .prepareCall(sql));
581                } catch (SQLException sqlException) {
582                        checkAndFireConnectionError(sqlException);
583                }
584
585                return null; // we don't reach this code, compiler can't tell
586        }
587
588        /**
589         * Passes call to method on physical connection instance. Notifies listeners
590         * of any caught exceptions before re-throwing to client.
591         *
592         * @see java.sql.Connection#prepareCall()
593         */
594        public java.sql.CallableStatement prepareCall(String sql,
595                        int resultSetType, int resultSetConcurrency) throws SQLException {
596                checkClosed();
597
598                try {
599                        return CallableStatementWrapper.getInstance(this, this.pooledConnection, this.mc
600                                        .prepareCall(sql, resultSetType, resultSetConcurrency));
601                } catch (SQLException sqlException) {
602                        checkAndFireConnectionError(sqlException);
603                }
604
605                return null; // we don't reach this code, compiler can't tell
606        }
607
608        /**
609         * @see Connection#prepareCall(String, int, int, int)
610         */
611        public java.sql.CallableStatement prepareCall(String arg0, int arg1,
612                        int arg2, int arg3) throws SQLException {
613                checkClosed();
614
615                try {
616                        return CallableStatementWrapper.getInstance(this, this.pooledConnection, this.mc
617                                        .prepareCall(arg0, arg1, arg2, arg3));
618                } catch (SQLException sqlException) {
619                        checkAndFireConnectionError(sqlException);
620                }
621
622                return null; // we don't reach this code, compiler can't tell
623        }
624
625        public java.sql.PreparedStatement clientPrepare(String sql)
626                        throws SQLException {
627                checkClosed();
628
629                try {
630                        return new PreparedStatementWrapper(this, this.pooledConnection, this.mc
631                                        .clientPrepareStatement(sql));
632                } catch (SQLException sqlException) {
633                        checkAndFireConnectionError(sqlException);
634                }
635
636                return null;
637        }
638
639        public java.sql.PreparedStatement clientPrepare(String sql,
640                        int resultSetType, int resultSetConcurrency) throws SQLException {
641                checkClosed();
642
643                try {
644                        return new PreparedStatementWrapper(this, this.pooledConnection, this.mc
645                                        .clientPrepareStatement(sql, resultSetType,
646                                                        resultSetConcurrency));
647                } catch (SQLException sqlException) {
648                        checkAndFireConnectionError(sqlException);
649                }
650
651                return null;
652        }
653
654        /**
655         * Passes call to method on physical connection instance. Notifies listeners
656         * of any caught exceptions before re-throwing to client.
657         *
658         * @see java.sql.Connection#prepareStatement()
659         */
660        public java.sql.PreparedStatement prepareStatement(String sql)
661                        throws SQLException {
662                checkClosed();
663
664                try {
665                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
666                                        .prepareStatement(sql));
667                } catch (SQLException sqlException) {
668                        checkAndFireConnectionError(sqlException);
669                }
670
671                return null; // we don't reach this code, compiler can't tell
672        }
673
674        /**
675         * Passes call to method on physical connection instance. Notifies listeners
676         * of any caught exceptions before re-throwing to client.
677         *
678         * @see java.sql.Connection#prepareStatement()
679         */
680        public java.sql.PreparedStatement prepareStatement(String sql,
681                        int resultSetType, int resultSetConcurrency) throws SQLException {
682                checkClosed();
683
684                try {
685                        return PreparedStatementWrapper
686                                        .getInstance(this, this.pooledConnection, this.mc.prepareStatement(sql,
687                                                        resultSetType, resultSetConcurrency));
688                } catch (SQLException sqlException) {
689                        checkAndFireConnectionError(sqlException);
690                }
691
692                return null; // we don't reach this code, compiler can't tell
693        }
694
695        /**
696         * @see Connection#prepareStatement(String, int, int, int)
697         */
698        public java.sql.PreparedStatement prepareStatement(String arg0, int arg1,
699                        int arg2, int arg3) throws SQLException {
700                checkClosed();
701
702                try {
703                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
704                                        .prepareStatement(arg0, arg1, arg2, arg3));
705                } catch (SQLException sqlException) {
706                        checkAndFireConnectionError(sqlException);
707                }
708
709                return null; // we don't reach this code, compiler can't tell
710        }
711
712        /**
713         * @see Connection#prepareStatement(String, int)
714         */
715        public java.sql.PreparedStatement prepareStatement(String arg0, int arg1)
716                        throws SQLException {
717                checkClosed();
718
719                try {
720                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
721                                        .prepareStatement(arg0, arg1));
722                } catch (SQLException sqlException) {
723                        checkAndFireConnectionError(sqlException);
724                }
725
726                return null; // we don't reach this code, compiler can't tell
727        }
728
729        /**
730         * @see Connection#prepareStatement(String, int[])
731         */
732        public java.sql.PreparedStatement prepareStatement(String arg0, int[] arg1)
733                        throws SQLException {
734                checkClosed();
735
736                try {
737                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
738                                        .prepareStatement(arg0, arg1));
739                } catch (SQLException sqlException) {
740                        checkAndFireConnectionError(sqlException);
741                }
742
743                return null; // we don't reach this code, compiler can't tell
744        }
745
746        /**
747         * @see Connection#prepareStatement(String, String[])
748         */
749        public java.sql.PreparedStatement prepareStatement(String arg0,
750                        String[] arg1) throws SQLException {
751                checkClosed();
752
753                try {
754                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
755                                        .prepareStatement(arg0, arg1));
756                } catch (SQLException sqlException) {
757                        checkAndFireConnectionError(sqlException);
758                }
759
760                return null; // we don't reach this code, compiler can't tell
761        }
762
763        /**
764         * @see Connection#releaseSavepoint(Savepoint)
765         */
766        public void releaseSavepoint(Savepoint arg0) throws SQLException {
767                checkClosed();
768
769                try {
770                        this.mc.releaseSavepoint(arg0);
771                } catch (SQLException sqlException) {
772                        checkAndFireConnectionError(sqlException);
773                }
774        }
775
776        /**
777         * Passes call to method on physical connection instance. Notifies listeners
778         * of any caught exceptions before re-throwing to client.
779         *
780         * @see java.sql.Connection#rollback()
781         */
782        public void rollback() throws SQLException {
783                checkClosed();
784
785                if (isInGlobalTx()) {
786                        throw SQLError
787                                        .createSQLException(
788                                                        "Can't call rollback() on an XAConnection associated with a global transaction",
789                                                        SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION,
790                                                        MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor);
791                }
792
793                try {
794                        this.mc.rollback();
795                } catch (SQLException sqlException) {
796                        checkAndFireConnectionError(sqlException);
797                }
798        }
799
800        /**
801         * @see Connection#rollback(Savepoint)
802         */
803        public void rollback(Savepoint arg0) throws SQLException {
804                checkClosed();
805
806                if (isInGlobalTx()) {
807                        throw SQLError
808                                        .createSQLException(
809                                                        "Can't call rollback() on an XAConnection associated with a global transaction",
810                                                        SQLError.SQL_STATE_INVALID_TRANSACTION_TERMINATION,
811                                                        MysqlErrorNumbers.ER_XA_RMERR, this.exceptionInterceptor);
812                }
813
814                try {
815                        this.mc.rollback(arg0);
816                } catch (SQLException sqlException) {
817                        checkAndFireConnectionError(sqlException);
818                }
819        }
820
821        public boolean isSameResource(com.mysql.jdbc.Connection c) {
822                if (c instanceof ConnectionWrapper) {
823                        return this.mc.isSameResource(((ConnectionWrapper) c).mc);
824                }
825                return this.mc.isSameResource(c);
826        }
827
828        protected void close(boolean fireClosedEvent) throws SQLException {
829                synchronized (this.pooledConnection) {
830                        if (this.closed) {
831                                return;
832                        }
833
834                        if (!isInGlobalTx() && this.mc.getRollbackOnPooledClose()
835                                        && !this.getAutoCommit()) {
836                                rollback();
837                        }
838
839                        if (fireClosedEvent) {
840                                this.pooledConnection.callConnectionEventListeners(
841                                                MysqlPooledConnection.CONNECTION_CLOSED_EVENT, null);
842                        }
843
844                        // set closed status to true so that if application client tries to
845                        // make additional
846                        // calls a sqlException will be thrown. The physical connection is
847                        // re-used by the pooled connection each time getConnection is
848                        // called.
849                        this.closed = true;
850                }
851        }
852
853        protected void checkClosed() throws SQLException {
854                if (this.closed) {
855                        throw SQLError.createSQLException(this.invalidHandleStr, this.exceptionInterceptor);
856                }
857        }
858
859        public boolean isInGlobalTx() {
860                return this.mc.isInGlobalTx();
861        }
862
863        public void setInGlobalTx(boolean flag) {
864                this.mc.setInGlobalTx(flag);
865        }
866
867        public void ping() throws SQLException {
868                if (this.mc != null) {
869                        this.mc.ping();
870                }
871        }
872
873        public void changeUser(String userName, String newPassword)
874                        throws SQLException {
875                checkClosed();
876
877                try {
878                        this.mc.changeUser(userName, newPassword);
879                } catch (SQLException sqlException) {
880                        checkAndFireConnectionError(sqlException);
881                }
882        }
883
884        public void clearHasTriedMaster() {
885                this.mc.clearHasTriedMaster();
886        }
887
888        public java.sql.PreparedStatement clientPrepareStatement(String sql)
889                        throws SQLException {
890                checkClosed();
891
892                try {
893                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
894                                        .clientPrepareStatement(sql));
895                } catch (SQLException sqlException) {
896                        checkAndFireConnectionError(sqlException);
897                }
898
899                return null;
900        }
901
902        public java.sql.PreparedStatement clientPrepareStatement(String sql,
903                        int autoGenKeyIndex) throws SQLException {
904                try {
905                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
906                                        .clientPrepareStatement(sql, autoGenKeyIndex));
907                } catch (SQLException sqlException) {
908                        checkAndFireConnectionError(sqlException);
909                }
910
911                return null;
912        }
913
914        public java.sql.PreparedStatement clientPrepareStatement(String sql,
915                        int resultSetType, int resultSetConcurrency) throws SQLException {
916                try {
917                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
918                                        .clientPrepareStatement(sql, resultSetType,
919                                                        resultSetConcurrency));
920                } catch (SQLException sqlException) {
921                        checkAndFireConnectionError(sqlException);
922                }
923
924                return null;
925        }
926
927        public java.sql.PreparedStatement clientPrepareStatement(String sql,
928                        int resultSetType, int resultSetConcurrency,
929                        int resultSetHoldability) throws SQLException {
930                try {
931                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
932                                        .clientPrepareStatement(sql, resultSetType,
933                                                        resultSetConcurrency, resultSetHoldability));
934                } catch (SQLException sqlException) {
935                        checkAndFireConnectionError(sqlException);
936                }
937
938                return null;
939        }
940
941        public java.sql.PreparedStatement clientPrepareStatement(String sql,
942                        int[] autoGenKeyIndexes) throws SQLException {
943                try {
944                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
945                                        .clientPrepareStatement(sql, autoGenKeyIndexes));
946                } catch (SQLException sqlException) {
947                        checkAndFireConnectionError(sqlException);
948                }
949
950                return null;
951        }
952
953        public java.sql.PreparedStatement clientPrepareStatement(String sql,
954                        String[] autoGenKeyColNames) throws SQLException {
955                try {
956                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
957                                        .clientPrepareStatement(sql, autoGenKeyColNames));
958                } catch (SQLException sqlException) {
959                        checkAndFireConnectionError(sqlException);
960                }
961
962                return null;
963        }
964
965        public int getActiveStatementCount() {
966                return this.mc.getActiveStatementCount();
967        }
968
969        public Log getLog() throws SQLException {
970                return this.mc.getLog();
971        }
972
973        public String getServerCharacterEncoding() {
974                return this.mc.getServerCharacterEncoding();
975        }
976
977        public TimeZone getServerTimezoneTZ() {
978                return this.mc.getServerTimezoneTZ();
979        }
980
981        public String getStatementComment() {
982                return this.mc.getStatementComment();
983        }
984
985        public boolean hasTriedMaster() {
986                return this.mc.hasTriedMaster();
987        }
988
989        public boolean isAbonormallyLongQuery(long millisOrNanos) {
990                return this.mc.isAbonormallyLongQuery(millisOrNanos);
991        }
992
993        public boolean isNoBackslashEscapesSet() {
994                return this.mc.isNoBackslashEscapesSet();
995        }
996
997        public boolean lowerCaseTableNames() {
998                return this.mc.lowerCaseTableNames();
999        }
1000
1001        public boolean parserKnowsUnicode() {
1002                return this.mc.parserKnowsUnicode();
1003        }
1004
1005        public void reportQueryTime(long millisOrNanos) {
1006                this.mc.reportQueryTime(millisOrNanos);
1007        }
1008
1009        public void resetServerState() throws SQLException {
1010                checkClosed();
1011
1012                try {
1013                        this.mc.resetServerState();
1014                } catch (SQLException sqlException) {
1015                        checkAndFireConnectionError(sqlException);
1016                }
1017        }
1018
1019        public java.sql.PreparedStatement serverPrepareStatement(String sql)
1020                        throws SQLException {
1021                checkClosed();
1022
1023                try {
1024                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
1025                                        .serverPrepareStatement(sql));
1026                } catch (SQLException sqlException) {
1027                        checkAndFireConnectionError(sqlException);
1028                }
1029
1030                return null;
1031        }
1032
1033        public java.sql.PreparedStatement serverPrepareStatement(String sql,
1034                        int autoGenKeyIndex) throws SQLException {
1035                try {
1036                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
1037                                        .serverPrepareStatement(sql, autoGenKeyIndex));
1038                } catch (SQLException sqlException) {
1039                        checkAndFireConnectionError(sqlException);
1040                }
1041
1042                return null;
1043        }
1044
1045        public java.sql.PreparedStatement serverPrepareStatement(String sql,
1046                        int resultSetType, int resultSetConcurrency) throws SQLException {
1047                try {
1048                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
1049                                        .serverPrepareStatement(sql, resultSetType,
1050                                                        resultSetConcurrency));
1051                } catch (SQLException sqlException) {
1052                        checkAndFireConnectionError(sqlException);
1053                }
1054
1055                return null;
1056        }
1057
1058        public java.sql.PreparedStatement serverPrepareStatement(String sql,
1059                        int resultSetType, int resultSetConcurrency,
1060                        int resultSetHoldability) throws SQLException {
1061                try {
1062                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
1063                                        .serverPrepareStatement(sql, resultSetType,
1064                                                        resultSetConcurrency, resultSetHoldability));
1065                } catch (SQLException sqlException) {
1066                        checkAndFireConnectionError(sqlException);
1067                }
1068
1069                return null;
1070        }
1071
1072        public java.sql.PreparedStatement serverPrepareStatement(String sql,
1073                        int[] autoGenKeyIndexes) throws SQLException {
1074                try {
1075                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
1076                                        .serverPrepareStatement(sql, autoGenKeyIndexes));
1077                } catch (SQLException sqlException) {
1078                        checkAndFireConnectionError(sqlException);
1079                }
1080
1081                return null;
1082        }
1083
1084        public java.sql.PreparedStatement serverPrepareStatement(String sql,
1085                        String[] autoGenKeyColNames) throws SQLException {
1086                try {
1087                        return PreparedStatementWrapper.getInstance(this, this.pooledConnection, this.mc
1088                                        .serverPrepareStatement(sql, autoGenKeyColNames));
1089                } catch (SQLException sqlException) {
1090                        checkAndFireConnectionError(sqlException);
1091                }
1092
1093                return null;
1094        }
1095
1096        public void setFailedOver(boolean flag) {
1097                this.mc.setFailedOver(flag);
1098
1099        }
1100
1101        public void setPreferSlaveDuringFailover(boolean flag) {
1102                this.mc.setPreferSlaveDuringFailover(flag);
1103        }
1104
1105        public void setStatementComment(String comment) {
1106                this.mc.setStatementComment(comment);
1107
1108        }
1109
1110        public void shutdownServer() throws SQLException {
1111                checkClosed();
1112
1113                try {
1114                        this.mc.shutdownServer();
1115                } catch (SQLException sqlException) {
1116                        checkAndFireConnectionError(sqlException);
1117                }
1118
1119        }
1120
1121        public boolean supportsIsolationLevel() {
1122                return this.mc.supportsIsolationLevel();
1123        }
1124
1125        public boolean supportsQuotedIdentifiers() {
1126                return this.mc.supportsQuotedIdentifiers();
1127        }
1128
1129        public boolean supportsTransactions() {
1130                return this.mc.supportsTransactions();
1131        }
1132
1133        public boolean versionMeetsMinimum(int major, int minor, int subminor)
1134                        throws SQLException {
1135                checkClosed();
1136
1137                try {
1138                        return this.mc.versionMeetsMinimum(major, minor, subminor);
1139                } catch (SQLException sqlException) {
1140                        checkAndFireConnectionError(sqlException);
1141                }
1142
1143                return false;
1144        }
1145
1146        public String exposeAsXml() throws SQLException {
1147                checkClosed();
1148
1149                try {
1150                        return this.mc.exposeAsXml();
1151                } catch (SQLException sqlException) {
1152                        checkAndFireConnectionError(sqlException);
1153                }
1154
1155                return null;
1156        }
1157
1158        public boolean getAllowLoadLocalInfile() {
1159                return this.mc.getAllowLoadLocalInfile();
1160        }
1161
1162        public boolean getAllowMultiQueries() {
1163                return this.mc.getAllowMultiQueries();
1164        }
1165
1166        public boolean getAllowNanAndInf() {
1167                return this.mc.getAllowNanAndInf();
1168        }
1169
1170        public boolean getAllowUrlInLocalInfile() {
1171                return this.mc.getAllowUrlInLocalInfile();
1172        }
1173
1174        public boolean getAlwaysSendSetIsolation() {
1175                return this.mc.getAlwaysSendSetIsolation();
1176        }
1177
1178        public boolean getAutoClosePStmtStreams() {
1179                return this.mc.getAutoClosePStmtStreams();
1180        }
1181
1182        public boolean getAutoDeserialize() {
1183                return this.mc.getAutoDeserialize();
1184        }
1185
1186        public boolean getAutoGenerateTestcaseScript() {
1187                return this.mc.getAutoGenerateTestcaseScript();
1188        }
1189
1190        public boolean getAutoReconnectForPools() {
1191                return this.mc.getAutoReconnectForPools();
1192        }
1193
1194        public boolean getAutoSlowLog() {
1195                return this.mc.getAutoSlowLog();
1196        }
1197
1198        public int getBlobSendChunkSize() {
1199                return this.mc.getBlobSendChunkSize();
1200        }
1201
1202        public boolean getBlobsAreStrings() {
1203                return this.mc.getBlobsAreStrings();
1204        }
1205
1206        public boolean getCacheCallableStatements() {
1207                return this.mc.getCacheCallableStatements();
1208        }
1209
1210        public boolean getCacheCallableStmts() {
1211                return this.mc.getCacheCallableStmts();
1212        }
1213
1214        public boolean getCachePrepStmts() {
1215                return this.mc.getCachePrepStmts();
1216        }
1217
1218        public boolean getCachePreparedStatements() {
1219                return this.mc.getCachePreparedStatements();
1220        }
1221
1222        public boolean getCacheResultSetMetadata() {
1223                return this.mc.getCacheResultSetMetadata();
1224        }
1225
1226        public boolean getCacheServerConfiguration() {
1227                return this.mc.getCacheServerConfiguration();
1228        }
1229
1230        public int getCallableStatementCacheSize() {
1231                return this.mc.getCallableStatementCacheSize();
1232        }
1233
1234        public int getCallableStmtCacheSize() {
1235                return this.mc.getCallableStmtCacheSize();
1236        }
1237
1238        public boolean getCapitalizeTypeNames() {
1239                return this.mc.getCapitalizeTypeNames();
1240        }
1241
1242        public String getCharacterSetResults() {
1243                return this.mc.getCharacterSetResults();
1244        }
1245
1246        public String getClientCertificateKeyStorePassword() {
1247                return this.mc.getClientCertificateKeyStorePassword();
1248        }
1249
1250        public String getClientCertificateKeyStoreType() {
1251                return this.mc.getClientCertificateKeyStoreType();
1252        }
1253
1254        public String getClientCertificateKeyStoreUrl() {
1255                return this.mc.getClientCertificateKeyStoreUrl();
1256        }
1257
1258        public String getClientInfoProvider() {
1259                return this.mc.getClientInfoProvider();
1260        }
1261
1262        public String getClobCharacterEncoding() {
1263                return this.mc.getClobCharacterEncoding();
1264        }
1265
1266        public boolean getClobberStreamingResults() {
1267                return this.mc.getClobberStreamingResults();
1268        }
1269
1270        public int getConnectTimeout() {
1271                return this.mc.getConnectTimeout();
1272        }
1273
1274        public String getConnectionCollation() {
1275                return this.mc.getConnectionCollation();
1276        }
1277
1278        public String getConnectionLifecycleInterceptors() {
1279                return this.mc.getConnectionLifecycleInterceptors();
1280        }
1281
1282        public boolean getContinueBatchOnError() {
1283                return this.mc.getContinueBatchOnError();
1284        }
1285
1286        public boolean getCreateDatabaseIfNotExist() {
1287                return this.mc.getCreateDatabaseIfNotExist();
1288        }
1289
1290        public int getDefaultFetchSize() {
1291                return this.mc.getDefaultFetchSize();
1292        }
1293
1294        public boolean getDontTrackOpenResources() {
1295                return this.mc.getDontTrackOpenResources();
1296        }
1297
1298        public boolean getDumpMetadataOnColumnNotFound() {
1299                return this.mc.getDumpMetadataOnColumnNotFound();
1300        }
1301
1302        public boolean getDumpQueriesOnException() {
1303                return this.mc.getDumpQueriesOnException();
1304        }
1305
1306        public boolean getDynamicCalendars() {
1307                return this.mc.getDynamicCalendars();
1308        }
1309
1310        public boolean getElideSetAutoCommits() {
1311                return this.mc.getElideSetAutoCommits();
1312        }
1313
1314        public boolean getEmptyStringsConvertToZero() {
1315                return this.mc.getEmptyStringsConvertToZero();
1316        }
1317
1318        public boolean getEmulateLocators() {
1319                return this.mc.getEmulateLocators();
1320        }
1321
1322        public boolean getEmulateUnsupportedPstmts() {
1323                return this.mc.getEmulateUnsupportedPstmts();
1324        }
1325
1326        public boolean getEnablePacketDebug() {
1327                return this.mc.getEnablePacketDebug();
1328        }
1329
1330        public boolean getEnableQueryTimeouts() {
1331                return this.mc.getEnableQueryTimeouts();
1332        }
1333
1334        public String getEncoding() {
1335                return this.mc.getEncoding();
1336        }
1337
1338        public boolean getExplainSlowQueries() {
1339                return this.mc.getExplainSlowQueries();
1340        }
1341
1342        public boolean getFailOverReadOnly() {
1343                return this.mc.getFailOverReadOnly();
1344        }
1345
1346        public boolean getFunctionsNeverReturnBlobs() {
1347                return this.mc.getFunctionsNeverReturnBlobs();
1348        }
1349
1350        public boolean getGatherPerfMetrics() {
1351                return this.mc.getGatherPerfMetrics();
1352        }
1353
1354        public boolean getGatherPerformanceMetrics() {
1355                return this.mc.getGatherPerformanceMetrics();
1356        }
1357
1358        public boolean getGenerateSimpleParameterMetadata() {
1359                return this.mc.getGenerateSimpleParameterMetadata();
1360        }
1361
1362        public boolean getHoldResultsOpenOverStatementClose() {
1363                return this.mc.getHoldResultsOpenOverStatementClose();
1364        }
1365
1366        public boolean getIgnoreNonTxTables() {
1367                return this.mc.getIgnoreNonTxTables();
1368        }
1369
1370        public boolean getIncludeInnodbStatusInDeadlockExceptions() {
1371                return this.mc.getIncludeInnodbStatusInDeadlockExceptions();
1372        }
1373
1374        public int getInitialTimeout() {
1375                return this.mc.getInitialTimeout();
1376        }
1377
1378        public boolean getInteractiveClient() {
1379                return this.mc.getInteractiveClient();
1380        }
1381
1382        public boolean getIsInteractiveClient() {
1383                return this.mc.getIsInteractiveClient();
1384        }
1385
1386        public boolean getJdbcCompliantTruncation() {
1387                return this.mc.getJdbcCompliantTruncation();
1388        }
1389
1390        public boolean getJdbcCompliantTruncationForReads() {
1391                return this.mc.getJdbcCompliantTruncationForReads();
1392        }
1393
1394        public String getLargeRowSizeThreshold() {
1395                return this.mc.getLargeRowSizeThreshold();
1396        }
1397
1398        public String getLoadBalanceStrategy() {
1399                return this.mc.getLoadBalanceStrategy();
1400        }
1401
1402        public String getLocalSocketAddress() {
1403                return this.mc.getLocalSocketAddress();
1404        }
1405
1406        public int getLocatorFetchBufferSize() {
1407                return this.mc.getLocatorFetchBufferSize();
1408        }
1409
1410        public boolean getLogSlowQueries() {
1411                return this.mc.getLogSlowQueries();
1412        }
1413
1414        public boolean getLogXaCommands() {
1415                return this.mc.getLogXaCommands();
1416        }
1417
1418        public String getLogger() {
1419                return this.mc.getLogger();
1420        }
1421
1422        public String getLoggerClassName() {
1423                return this.mc.getLoggerClassName();
1424        }
1425
1426        public boolean getMaintainTimeStats() {
1427                return this.mc.getMaintainTimeStats();
1428        }
1429
1430        public int getMaxQuerySizeToLog() {
1431                return this.mc.getMaxQuerySizeToLog();
1432        }
1433
1434        public int getMaxReconnects() {
1435                return this.mc.getMaxReconnects();
1436        }
1437
1438        public int getMaxRows() {
1439                return this.mc.getMaxRows();
1440        }
1441
1442        public int getMetadataCacheSize() {
1443                return this.mc.getMetadataCacheSize();
1444        }
1445
1446        public int getNetTimeoutForStreamingResults() {
1447                return this.mc.getNetTimeoutForStreamingResults();
1448        }
1449
1450        public boolean getNoAccessToProcedureBodies() {
1451                return this.mc.getNoAccessToProcedureBodies();
1452        }
1453
1454        public boolean getNoDatetimeStringSync() {
1455                return this.mc.getNoDatetimeStringSync();
1456        }
1457
1458        public boolean getNoTimezoneConversionForTimeType() {
1459                return this.mc.getNoTimezoneConversionForTimeType();
1460        }
1461
1462        public boolean getNullCatalogMeansCurrent() {
1463                return this.mc.getNullCatalogMeansCurrent();
1464        }
1465
1466        public boolean getNullNamePatternMatchesAll() {
1467                return this.mc.getNullNamePatternMatchesAll();
1468        }
1469
1470        public boolean getOverrideSupportsIntegrityEnhancementFacility() {
1471                return this.mc.getOverrideSupportsIntegrityEnhancementFacility();
1472        }
1473
1474        public int getPacketDebugBufferSize() {
1475                return this.mc.getPacketDebugBufferSize();
1476        }
1477
1478        public boolean getPadCharsWithSpace() {
1479                return this.mc.getPadCharsWithSpace();
1480        }
1481
1482        public boolean getParanoid() {
1483                return this.mc.getParanoid();
1484        }
1485
1486        public boolean getPedantic() {
1487                return this.mc.getPedantic();
1488        }
1489
1490        public boolean getPinGlobalTxToPhysicalConnection() {
1491                return this.mc.getPinGlobalTxToPhysicalConnection();
1492        }
1493
1494        public boolean getPopulateInsertRowWithDefaultValues() {
1495                return this.mc.getPopulateInsertRowWithDefaultValues();
1496        }
1497
1498        public int getPrepStmtCacheSize() {
1499                return this.mc.getPrepStmtCacheSize();
1500        }
1501
1502        public int getPrepStmtCacheSqlLimit() {
1503                return this.mc.getPrepStmtCacheSqlLimit();
1504        }
1505
1506        public int getPreparedStatementCacheSize() {
1507                return this.mc.getPreparedStatementCacheSize();
1508        }
1509
1510        public int getPreparedStatementCacheSqlLimit() {
1511                return this.mc.getPreparedStatementCacheSqlLimit();
1512        }
1513
1514        public boolean getProcessEscapeCodesForPrepStmts() {
1515                return this.mc.getProcessEscapeCodesForPrepStmts();
1516        }
1517
1518        public boolean getProfileSQL() {
1519                return this.mc.getProfileSQL();
1520        }
1521
1522        public boolean getProfileSql() {
1523                return this.mc.getProfileSql();
1524        }
1525
1526        public String getPropertiesTransform() {
1527                return this.mc.getPropertiesTransform();
1528        }
1529
1530        public int getQueriesBeforeRetryMaster() {
1531                return this.mc.getQueriesBeforeRetryMaster();
1532        }
1533
1534        public boolean getReconnectAtTxEnd() {
1535                return this.mc.getReconnectAtTxEnd();
1536        }
1537
1538        public boolean getRelaxAutoCommit() {
1539                return this.mc.getRelaxAutoCommit();
1540        }
1541
1542        public int getReportMetricsIntervalMillis() {
1543                return this.mc.getReportMetricsIntervalMillis();
1544        }
1545
1546        public boolean getRequireSSL() {
1547                return this.mc.getRequireSSL();
1548        }
1549
1550        public String getResourceId() {
1551                return this.mc.getResourceId();
1552        }
1553
1554        public int getResultSetSizeThreshold() {
1555                return this.mc.getResultSetSizeThreshold();
1556        }
1557
1558        public boolean getRewriteBatchedStatements() {
1559                return this.mc.getRewriteBatchedStatements();
1560        }
1561
1562        public boolean getRollbackOnPooledClose() {
1563                return this.mc.getRollbackOnPooledClose();
1564        }
1565
1566        public boolean getRoundRobinLoadBalance() {
1567                return this.mc.getRoundRobinLoadBalance();
1568        }
1569
1570        public boolean getRunningCTS13() {
1571                return this.mc.getRunningCTS13();
1572        }
1573
1574        public int getSecondsBeforeRetryMaster() {
1575                return this.mc.getSecondsBeforeRetryMaster();
1576        }
1577
1578        public String getServerTimezone() {
1579                return this.mc.getServerTimezone();
1580        }
1581
1582        public String getSessionVariables() {
1583                return this.mc.getSessionVariables();
1584        }
1585
1586        public int getSlowQueryThresholdMillis() {
1587                return this.mc.getSlowQueryThresholdMillis();
1588        }
1589
1590        public long getSlowQueryThresholdNanos() {
1591                return this.mc.getSlowQueryThresholdNanos();
1592        }
1593
1594        public String getSocketFactory() {
1595                return this.mc.getSocketFactory();
1596        }
1597
1598        public String getSocketFactoryClassName() {
1599                return this.mc.getSocketFactoryClassName();
1600        }
1601
1602        public int getSocketTimeout() {
1603                return this.mc.getSocketTimeout();
1604        }
1605
1606        public String getStatementInterceptors() {
1607                return this.mc.getStatementInterceptors();
1608        }
1609
1610        public boolean getStrictFloatingPoint() {
1611                return this.mc.getStrictFloatingPoint();
1612        }
1613
1614        public boolean getStrictUpdates() {
1615                return this.mc.getStrictUpdates();
1616        }
1617
1618        public boolean getTcpKeepAlive() {
1619                return this.mc.getTcpKeepAlive();
1620        }
1621
1622        public boolean getTcpNoDelay() {
1623                return this.mc.getTcpNoDelay();
1624        }
1625
1626        public int getTcpRcvBuf() {
1627                return this.mc.getTcpRcvBuf();
1628        }
1629
1630        public int getTcpSndBuf() {
1631                return this.mc.getTcpSndBuf();
1632        }
1633
1634        public int getTcpTrafficClass() {
1635                return this.mc.getTcpTrafficClass();
1636        }
1637
1638        public boolean getTinyInt1isBit() {
1639                return this.mc.getTinyInt1isBit();
1640        }
1641
1642        public boolean getTraceProtocol() {
1643                return this.mc.getTraceProtocol();
1644        }
1645
1646        public boolean getTransformedBitIsBoolean() {
1647                return this.mc.getTransformedBitIsBoolean();
1648        }
1649
1650        public boolean getTreatUtilDateAsTimestamp() {
1651                return this.mc.getTreatUtilDateAsTimestamp();
1652        }
1653
1654        public String getTrustCertificateKeyStorePassword() {
1655                return this.mc.getTrustCertificateKeyStorePassword();
1656        }
1657
1658        public String getTrustCertificateKeyStoreType() {
1659                return this.mc.getTrustCertificateKeyStoreType();
1660        }
1661
1662        public String getTrustCertificateKeyStoreUrl() {
1663                return this.mc.getTrustCertificateKeyStoreUrl();
1664        }
1665
1666        public boolean getUltraDevHack() {
1667                return this.mc.getUltraDevHack();
1668        }
1669
1670        public boolean getUseBlobToStoreUTF8OutsideBMP() {
1671                return this.mc.getUseBlobToStoreUTF8OutsideBMP();
1672        }
1673
1674        public boolean getUseCompression() {
1675                return this.mc.getUseCompression();
1676        }
1677
1678        public String getUseConfigs() {
1679                return this.mc.getUseConfigs();
1680        }
1681
1682        public boolean getUseCursorFetch() {
1683                return this.mc.getUseCursorFetch();
1684        }
1685
1686        public boolean getUseDirectRowUnpack() {
1687                return this.mc.getUseDirectRowUnpack();
1688        }
1689
1690        public boolean getUseDynamicCharsetInfo() {
1691                return this.mc.getUseDynamicCharsetInfo();
1692        }
1693
1694        public boolean getUseFastDateParsing() {
1695                return this.mc.getUseFastDateParsing();
1696        }
1697
1698        public boolean getUseFastIntParsing() {
1699                return this.mc.getUseFastIntParsing();
1700        }
1701
1702        public boolean getUseGmtMillisForDatetimes() {
1703                return this.mc.getUseGmtMillisForDatetimes();
1704        }
1705
1706        public boolean getUseHostsInPrivileges() {
1707                return this.mc.getUseHostsInPrivileges();
1708        }
1709
1710        public boolean getUseInformationSchema() {
1711                return this.mc.getUseInformationSchema();
1712        }
1713
1714        public boolean getUseJDBCCompliantTimezoneShift() {
1715                return this.mc.getUseJDBCCompliantTimezoneShift();
1716        }
1717
1718        public boolean getUseJvmCharsetConverters() {
1719                return this.mc.getUseJvmCharsetConverters();
1720        }
1721
1722        public boolean getUseLocalSessionState() {
1723                return this.mc.getUseLocalSessionState();
1724        }
1725
1726        public boolean getUseNanosForElapsedTime() {
1727                return this.mc.getUseNanosForElapsedTime();
1728        }
1729
1730        public boolean getUseOldAliasMetadataBehavior() {
1731                return this.mc.getUseOldAliasMetadataBehavior();
1732        }
1733
1734        public boolean getUseOldUTF8Behavior() {
1735                return this.mc.getUseOldUTF8Behavior();
1736        }
1737
1738        public boolean getUseOnlyServerErrorMessages() {
1739                return this.mc.getUseOnlyServerErrorMessages();
1740        }
1741
1742        public boolean getUseReadAheadInput() {
1743                return this.mc.getUseReadAheadInput();
1744        }
1745
1746        public boolean getUseSSL() {
1747                return this.mc.getUseSSL();
1748        }
1749
1750        public boolean getUseSSPSCompatibleTimezoneShift() {
1751                return this.mc.getUseSSPSCompatibleTimezoneShift();
1752        }
1753
1754        public boolean getUseServerPrepStmts() {
1755                return this.mc.getUseServerPrepStmts();
1756        }
1757
1758        public boolean getUseServerPreparedStmts() {
1759                return this.mc.getUseServerPreparedStmts();
1760        }
1761
1762        public boolean getUseSqlStateCodes() {
1763                return this.mc.getUseSqlStateCodes();
1764        }
1765
1766        public boolean getUseStreamLengthsInPrepStmts() {
1767                return this.mc.getUseStreamLengthsInPrepStmts();
1768        }
1769
1770        public boolean getUseTimezone() {
1771                return this.mc.getUseTimezone();
1772        }
1773
1774        public boolean getUseUltraDevWorkAround() {
1775                return this.mc.getUseUltraDevWorkAround();
1776        }
1777
1778        public boolean getUseUnbufferedInput() {
1779                return this.mc.getUseUnbufferedInput();
1780        }
1781
1782        public boolean getUseUnicode() {
1783                return this.mc.getUseUnicode();
1784        }
1785
1786        public boolean getUseUsageAdvisor() {
1787                return this.mc.getUseUsageAdvisor();
1788        }
1789
1790        public String getUtf8OutsideBmpExcludedColumnNamePattern() {
1791                return this.mc.getUtf8OutsideBmpExcludedColumnNamePattern();
1792        }
1793
1794        public String getUtf8OutsideBmpIncludedColumnNamePattern() {
1795                return this.mc.getUtf8OutsideBmpIncludedColumnNamePattern();
1796        }
1797
1798        public boolean getYearIsDateType() {
1799                return this.mc.getYearIsDateType();
1800        }
1801
1802        public String getZeroDateTimeBehavior() {
1803                return this.mc.getZeroDateTimeBehavior();
1804        }
1805
1806        public void setAllowLoadLocalInfile(boolean property) {
1807                this.mc.setAllowLoadLocalInfile(property);
1808        }
1809
1810        public void setAllowMultiQueries(boolean property) {
1811                this.mc.setAllowMultiQueries(property);
1812        }
1813
1814        public void setAllowNanAndInf(boolean flag) {
1815                this.mc.setAllowNanAndInf(flag);
1816        }
1817
1818        public void setAllowUrlInLocalInfile(boolean flag) {
1819                this.mc.setAllowUrlInLocalInfile(flag);
1820        }
1821
1822        public void setAlwaysSendSetIsolation(boolean flag) {
1823                this.mc.setAlwaysSendSetIsolation(flag);
1824        }
1825
1826        public void setAutoClosePStmtStreams(boolean flag) {
1827                this.mc.setAutoClosePStmtStreams(flag);
1828        }
1829
1830        public void setAutoDeserialize(boolean flag) {
1831                this.mc.setAutoDeserialize(flag);
1832        }
1833
1834        public void setAutoGenerateTestcaseScript(boolean flag) {
1835                this.mc.setAutoGenerateTestcaseScript(flag);
1836        }
1837
1838        public void setAutoReconnect(boolean flag) {
1839                this.mc.setAutoReconnect(flag);
1840        }
1841
1842        public void setAutoReconnectForConnectionPools(boolean property) {
1843                this.mc.setAutoReconnectForConnectionPools(property);
1844        }
1845
1846        public void setAutoReconnectForPools(boolean flag) {
1847                this.mc.setAutoReconnectForPools(flag);
1848        }
1849
1850        public void setAutoSlowLog(boolean flag) {
1851                this.mc.setAutoSlowLog(flag);
1852        }
1853
1854        public void setBlobSendChunkSize(String value) throws SQLException {
1855                this.mc.setBlobSendChunkSize(value);
1856        }
1857
1858        public void setBlobsAreStrings(boolean flag) {
1859                this.mc.setBlobsAreStrings(flag);
1860        }
1861
1862        public void setCacheCallableStatements(boolean flag) {
1863                this.mc.setCacheCallableStatements(flag);
1864        }
1865
1866        public void setCacheCallableStmts(boolean flag) {
1867                this.mc.setCacheCallableStmts(flag);
1868        }
1869
1870        public void setCachePrepStmts(boolean flag) {
1871                this.mc.setCachePrepStmts(flag);
1872        }
1873
1874        public void setCachePreparedStatements(boolean flag) {
1875                this.mc.setCachePreparedStatements(flag);
1876        }
1877
1878        public void setCacheResultSetMetadata(boolean property) {
1879                this.mc.setCacheResultSetMetadata(property);
1880        }
1881
1882        public void setCacheServerConfiguration(boolean flag) {
1883                this.mc.setCacheServerConfiguration(flag);
1884        }
1885
1886        public void setCallableStatementCacheSize(int size) {
1887                this.mc.setCallableStatementCacheSize(size);
1888        }
1889
1890        public void setCallableStmtCacheSize(int cacheSize) {
1891                this.mc.setCallableStmtCacheSize(cacheSize);
1892        }
1893
1894        public void setCapitalizeDBMDTypes(boolean property) {
1895                this.mc.setCapitalizeDBMDTypes(property);
1896        }
1897
1898        public void setCapitalizeTypeNames(boolean flag) {
1899                this.mc.setCapitalizeTypeNames(flag);
1900        }
1901
1902        public void setCharacterEncoding(String encoding) {
1903                this.mc.setCharacterEncoding(encoding);
1904        }
1905
1906        public void setCharacterSetResults(String characterSet) {
1907                this.mc.setCharacterSetResults(characterSet);
1908        }
1909
1910        public void setClientCertificateKeyStorePassword(String value) {
1911                this.mc.setClientCertificateKeyStorePassword(value);
1912        }
1913
1914        public void setClientCertificateKeyStoreType(String value) {
1915                this.mc.setClientCertificateKeyStoreType(value);
1916        }
1917
1918        public void setClientCertificateKeyStoreUrl(String value) {
1919                this.mc.setClientCertificateKeyStoreUrl(value);
1920        }
1921
1922        public void setClientInfoProvider(String classname) {
1923                this.mc.setClientInfoProvider(classname);
1924        }
1925
1926        public void setClobCharacterEncoding(String encoding) {
1927                this.mc.setClobCharacterEncoding(encoding);
1928        }
1929
1930        public void setClobberStreamingResults(boolean flag) {
1931                this.mc.setClobberStreamingResults(flag);
1932        }
1933
1934        public void setConnectTimeout(int timeoutMs) {
1935                this.mc.setConnectTimeout(timeoutMs);
1936        }
1937
1938        public void setConnectionCollation(String collation) {
1939                this.mc.setConnectionCollation(collation);
1940        }
1941
1942        public void setConnectionLifecycleInterceptors(String interceptors) {
1943                this.mc.setConnectionLifecycleInterceptors(interceptors);
1944        }
1945
1946        public void setContinueBatchOnError(boolean property) {
1947                this.mc.setContinueBatchOnError(property);
1948        }
1949
1950        public void setCreateDatabaseIfNotExist(boolean flag) {
1951                this.mc.setCreateDatabaseIfNotExist(flag);
1952        }
1953
1954        public void setDefaultFetchSize(int n) {
1955                this.mc.setDefaultFetchSize(n);
1956        }
1957
1958        public void setDetectServerPreparedStmts(boolean property) {
1959                this.mc.setDetectServerPreparedStmts(property);
1960        }
1961
1962        public void setDontTrackOpenResources(boolean flag) {
1963                this.mc.setDontTrackOpenResources(flag);
1964        }
1965
1966        public void setDumpMetadataOnColumnNotFound(boolean flag) {
1967                this.mc.setDumpMetadataOnColumnNotFound(flag);
1968        }
1969
1970        public void setDumpQueriesOnException(boolean flag) {
1971                this.mc.setDumpQueriesOnException(flag);
1972        }
1973
1974        public void setDynamicCalendars(boolean flag) {
1975                this.mc.setDynamicCalendars(flag);
1976        }
1977
1978        public void setElideSetAutoCommits(boolean flag) {
1979                this.mc.setElideSetAutoCommits(flag);
1980        }
1981
1982        public void setEmptyStringsConvertToZero(boolean flag) {
1983                this.mc.setEmptyStringsConvertToZero(flag);
1984        }
1985
1986        public void setEmulateLocators(boolean property) {
1987                this.mc.setEmulateLocators(property);
1988        }
1989
1990        public void setEmulateUnsupportedPstmts(boolean flag) {
1991                this.mc.setEmulateUnsupportedPstmts(flag);
1992        }
1993
1994        public void setEnablePacketDebug(boolean flag) {
1995                this.mc.setEnablePacketDebug(flag);
1996        }
1997
1998        public void setEnableQueryTimeouts(boolean flag) {
1999                this.mc.setEnableQueryTimeouts(flag);
2000        }
2001
2002        public void setEncoding(String property) {
2003                this.mc.setEncoding(property);
2004        }
2005
2006        public void setExplainSlowQueries(boolean flag) {
2007                this.mc.setExplainSlowQueries(flag);
2008        }
2009
2010        public void setFailOverReadOnly(boolean flag) {
2011                this.mc.setFailOverReadOnly(flag);
2012        }
2013
2014        public void setFunctionsNeverReturnBlobs(boolean flag) {
2015                this.mc.setFunctionsNeverReturnBlobs(flag);
2016        }
2017
2018        public void setGatherPerfMetrics(boolean flag) {
2019                this.mc.setGatherPerfMetrics(flag);
2020        }
2021
2022        public void setGatherPerformanceMetrics(boolean flag) {
2023                this.mc.setGatherPerformanceMetrics(flag);
2024        }
2025
2026        public void setGenerateSimpleParameterMetadata(boolean flag) {
2027                this.mc.setGenerateSimpleParameterMetadata(flag);
2028        }
2029
2030        public void setHoldResultsOpenOverStatementClose(boolean flag) {
2031                this.mc.setHoldResultsOpenOverStatementClose(flag);
2032        }
2033
2034        public void setIgnoreNonTxTables(boolean property) {
2035                this.mc.setIgnoreNonTxTables(property);
2036        }
2037
2038        public void setIncludeInnodbStatusInDeadlockExceptions(boolean flag) {
2039                this.mc.setIncludeInnodbStatusInDeadlockExceptions(flag);
2040        }
2041
2042        public void setInitialTimeout(int property) {
2043                this.mc.setInitialTimeout(property);
2044        }
2045
2046        public void setInteractiveClient(boolean property) {
2047                this.mc.setInteractiveClient(property);
2048        }
2049
2050        public void setIsInteractiveClient(boolean property) {
2051                this.mc.setIsInteractiveClient(property);
2052        }
2053
2054        public void setJdbcCompliantTruncation(boolean flag) {
2055                this.mc.setJdbcCompliantTruncation(flag);
2056        }
2057
2058        public void setJdbcCompliantTruncationForReads(
2059                        boolean jdbcCompliantTruncationForReads) {
2060                this.mc
2061                                .setJdbcCompliantTruncationForReads(jdbcCompliantTruncationForReads);
2062        }
2063
2064        public void setLargeRowSizeThreshold(String value) {
2065                this.mc.setLargeRowSizeThreshold(value);
2066        }
2067
2068        public void setLoadBalanceStrategy(String strategy) {
2069                this.mc.setLoadBalanceStrategy(strategy);
2070        }
2071
2072        public void setLocalSocketAddress(String address) {
2073                this.mc.setLocalSocketAddress(address);
2074        }
2075
2076        public void setLocatorFetchBufferSize(String value) throws SQLException {
2077                this.mc.setLocatorFetchBufferSize(value);
2078        }
2079
2080        public void setLogSlowQueries(boolean flag) {
2081                this.mc.setLogSlowQueries(flag);
2082        }
2083
2084        public void setLogXaCommands(boolean flag) {
2085                this.mc.setLogXaCommands(flag);
2086        }
2087
2088        public void setLogger(String property) {
2089                this.mc.setLogger(property);
2090        }
2091
2092        public void setLoggerClassName(String className) {
2093                this.mc.setLoggerClassName(className);
2094        }
2095
2096        public void setMaintainTimeStats(boolean flag) {
2097                this.mc.setMaintainTimeStats(flag);
2098        }
2099
2100        public void setMaxQuerySizeToLog(int sizeInBytes) {
2101                this.mc.setMaxQuerySizeToLog(sizeInBytes);
2102        }
2103
2104        public void setMaxReconnects(int property) {
2105                this.mc.setMaxReconnects(property);
2106        }
2107
2108        public void setMaxRows(int property) {
2109                this.mc.setMaxRows(property);
2110        }
2111
2112        public void setMetadataCacheSize(int value) {
2113                this.mc.setMetadataCacheSize(value);
2114        }
2115
2116        public void setNetTimeoutForStreamingResults(int value) {
2117                this.mc.setNetTimeoutForStreamingResults(value);
2118        }
2119
2120        public void setNoAccessToProcedureBodies(boolean flag) {
2121                this.mc.setNoAccessToProcedureBodies(flag);
2122        }
2123
2124        public void setNoDatetimeStringSync(boolean flag) {
2125                this.mc.setNoDatetimeStringSync(flag);
2126        }
2127
2128        public void setNoTimezoneConversionForTimeType(boolean flag) {
2129                this.mc.setNoTimezoneConversionForTimeType(flag);
2130        }
2131
2132        public void setNullCatalogMeansCurrent(boolean value) {
2133                this.mc.setNullCatalogMeansCurrent(value);
2134        }
2135
2136        public void setNullNamePatternMatchesAll(boolean value) {
2137                this.mc.setNullNamePatternMatchesAll(value);
2138        }
2139
2140        public void setOverrideSupportsIntegrityEnhancementFacility(boolean flag) {
2141                this.mc.setOverrideSupportsIntegrityEnhancementFacility(flag);
2142        }
2143
2144        public void setPacketDebugBufferSize(int size) {
2145                this.mc.setPacketDebugBufferSize(size);
2146        }
2147
2148        public void setPadCharsWithSpace(boolean flag) {
2149                this.mc.setPadCharsWithSpace(flag);
2150        }
2151
2152        public void setParanoid(boolean property) {
2153                this.mc.setParanoid(property);
2154        }
2155
2156        public void setPedantic(boolean property) {
2157                this.mc.setPedantic(property);
2158        }
2159
2160        public void setPinGlobalTxToPhysicalConnection(boolean flag) {
2161                this.mc.setPinGlobalTxToPhysicalConnection(flag);
2162        }
2163
2164        public void setPopulateInsertRowWithDefaultValues(boolean flag) {
2165                this.mc.setPopulateInsertRowWithDefaultValues(flag);
2166        }
2167
2168        public void setPrepStmtCacheSize(int cacheSize) {
2169                this.mc.setPrepStmtCacheSize(cacheSize);
2170        }
2171
2172        public void setPrepStmtCacheSqlLimit(int sqlLimit) {
2173                this.mc.setPrepStmtCacheSqlLimit(sqlLimit);
2174        }
2175
2176        public void setPreparedStatementCacheSize(int cacheSize) {
2177                this.mc.setPreparedStatementCacheSize(cacheSize);
2178        }
2179
2180        public void setPreparedStatementCacheSqlLimit(int cacheSqlLimit) {
2181                this.mc.setPreparedStatementCacheSqlLimit(cacheSqlLimit);
2182        }
2183
2184        public void setProcessEscapeCodesForPrepStmts(boolean flag) {
2185                this.mc.setProcessEscapeCodesForPrepStmts(flag);
2186        }
2187
2188        public void setProfileSQL(boolean flag) {
2189                this.mc.setProfileSQL(flag);
2190        }
2191
2192        public void setProfileSql(boolean property) {
2193                this.mc.setProfileSql(property);
2194        }
2195
2196        public void setPropertiesTransform(String value) {
2197                this.mc.setPropertiesTransform(value);
2198        }
2199
2200        public void setQueriesBeforeRetryMaster(int property) {
2201                this.mc.setQueriesBeforeRetryMaster(property);
2202        }
2203
2204        public void setReconnectAtTxEnd(boolean property) {
2205                this.mc.setReconnectAtTxEnd(property);
2206        }
2207
2208        public void setRelaxAutoCommit(boolean property) {
2209                this.mc.setRelaxAutoCommit(property);
2210        }
2211
2212        public void setReportMetricsIntervalMillis(int millis) {
2213                this.mc.setReportMetricsIntervalMillis(millis);
2214        }
2215
2216        public void setRequireSSL(boolean property) {
2217                this.mc.setRequireSSL(property);
2218        }
2219
2220        public void setResourceId(String resourceId) {
2221                this.mc.setResourceId(resourceId);
2222        }
2223
2224        public void setResultSetSizeThreshold(int threshold) {
2225                this.mc.setResultSetSizeThreshold(threshold);
2226        }
2227
2228        public void setRetainStatementAfterResultSetClose(boolean flag) {
2229                this.mc.setRetainStatementAfterResultSetClose(flag);
2230        }
2231
2232        public void setRewriteBatchedStatements(boolean flag) {
2233                this.mc.setRewriteBatchedStatements(flag);
2234        }
2235
2236        public void setRollbackOnPooledClose(boolean flag) {
2237                this.mc.setRollbackOnPooledClose(flag);
2238        }
2239
2240        public void setRoundRobinLoadBalance(boolean flag) {
2241                this.mc.setRoundRobinLoadBalance(flag);
2242        }
2243
2244        public void setRunningCTS13(boolean flag) {
2245                this.mc.setRunningCTS13(flag);
2246        }
2247
2248        public void setSecondsBeforeRetryMaster(int property) {
2249                this.mc.setSecondsBeforeRetryMaster(property);
2250        }
2251
2252        public void setServerTimezone(String property) {
2253                this.mc.setServerTimezone(property);
2254        }
2255
2256        public void setSessionVariables(String variables) {
2257                this.mc.setSessionVariables(variables);
2258        }
2259
2260        public void setSlowQueryThresholdMillis(int millis) {
2261                this.mc.setSlowQueryThresholdMillis(millis);
2262        }
2263
2264        public void setSlowQueryThresholdNanos(long nanos) {
2265                this.mc.setSlowQueryThresholdNanos(nanos);
2266        }
2267
2268        public void setSocketFactory(String name) {
2269                this.mc.setSocketFactory(name);
2270        }
2271
2272        public void setSocketFactoryClassName(String property) {
2273                this.mc.setSocketFactoryClassName(property);
2274        }
2275
2276        public void setSocketTimeout(int property) {
2277                this.mc.setSocketTimeout(property);
2278        }
2279
2280        public void setStatementInterceptors(String value) {
2281                this.mc.setStatementInterceptors(value);
2282        }
2283
2284        public void setStrictFloatingPoint(boolean property) {
2285                this.mc.setStrictFloatingPoint(property);
2286        }
2287
2288        public void setStrictUpdates(boolean property) {
2289                this.mc.setStrictUpdates(property);
2290        }
2291
2292        public void setTcpKeepAlive(boolean flag) {
2293                this.mc.setTcpKeepAlive(flag);
2294        }
2295
2296        public void setTcpNoDelay(boolean flag) {
2297                this.mc.setTcpNoDelay(flag);
2298        }
2299
2300        public void setTcpRcvBuf(int bufSize) {
2301                this.mc.setTcpRcvBuf(bufSize);
2302        }
2303
2304        public void setTcpSndBuf(int bufSize) {
2305                this.mc.setTcpSndBuf(bufSize);
2306        }
2307
2308        public void setTcpTrafficClass(int classFlags) {
2309                this.mc.setTcpTrafficClass(classFlags);
2310        }
2311
2312        public void setTinyInt1isBit(boolean flag) {
2313                this.mc.setTinyInt1isBit(flag);
2314        }
2315
2316        public void setTraceProtocol(boolean flag) {
2317                this.mc.setTraceProtocol(flag);
2318        }
2319
2320        public void setTransformedBitIsBoolean(boolean flag) {
2321                this.mc.setTransformedBitIsBoolean(flag);
2322        }
2323
2324        public void setTreatUtilDateAsTimestamp(boolean flag) {
2325                this.mc.setTreatUtilDateAsTimestamp(flag);
2326        }
2327
2328        public void setTrustCertificateKeyStorePassword(String value) {
2329                this.mc.setTrustCertificateKeyStorePassword(value);
2330        }
2331
2332        public void setTrustCertificateKeyStoreType(String value) {
2333                this.mc.setTrustCertificateKeyStoreType(value);
2334        }
2335
2336        public void setTrustCertificateKeyStoreUrl(String value) {
2337                this.mc.setTrustCertificateKeyStoreUrl(value);
2338        }
2339
2340        public void setUltraDevHack(boolean flag) {
2341                this.mc.setUltraDevHack(flag);
2342        }
2343
2344        public void setUseBlobToStoreUTF8OutsideBMP(boolean flag) {
2345                this.mc.setUseBlobToStoreUTF8OutsideBMP(flag);
2346        }
2347
2348        public void setUseCompression(boolean property) {
2349                this.mc.setUseCompression(property);
2350        }
2351
2352        public void setUseConfigs(String configs) {
2353                this.mc.setUseConfigs(configs);
2354        }
2355
2356        public void setUseCursorFetch(boolean flag) {
2357                this.mc.setUseCursorFetch(flag);
2358        }
2359
2360        public void setUseDirectRowUnpack(boolean flag) {
2361                this.mc.setUseDirectRowUnpack(flag);
2362        }
2363
2364        public void setUseDynamicCharsetInfo(boolean flag) {
2365                this.mc.setUseDynamicCharsetInfo(flag);
2366        }
2367
2368        public void setUseFastDateParsing(boolean flag) {
2369                this.mc.setUseFastDateParsing(flag);
2370        }
2371
2372        public void setUseFastIntParsing(boolean flag) {
2373                this.mc.setUseFastIntParsing(flag);
2374        }
2375
2376        public void setUseGmtMillisForDatetimes(boolean flag) {
2377                this.mc.setUseGmtMillisForDatetimes(flag);
2378        }
2379
2380        public void setUseHostsInPrivileges(boolean property) {
2381                this.mc.setUseHostsInPrivileges(property);
2382        }
2383
2384        public void setUseInformationSchema(boolean flag) {
2385                this.mc.setUseInformationSchema(flag);
2386        }
2387
2388        public void setUseJDBCCompliantTimezoneShift(boolean flag) {
2389                this.mc.setUseJDBCCompliantTimezoneShift(flag);
2390        }
2391
2392        public void setUseJvmCharsetConverters(boolean flag) {
2393                this.mc.setUseJvmCharsetConverters(flag);
2394        }
2395
2396        public void setUseLocalSessionState(boolean flag) {
2397                this.mc.setUseLocalSessionState(flag);
2398        }
2399
2400        public void setUseNanosForElapsedTime(boolean flag) {
2401                this.mc.setUseNanosForElapsedTime(flag);
2402        }
2403
2404        public void setUseOldAliasMetadataBehavior(boolean flag) {
2405                this.mc.setUseOldAliasMetadataBehavior(flag);
2406        }
2407
2408        public void setUseOldUTF8Behavior(boolean flag) {
2409                this.mc.setUseOldUTF8Behavior(flag);
2410        }
2411
2412        public void setUseOnlyServerErrorMessages(boolean flag) {
2413                this.mc.setUseOnlyServerErrorMessages(flag);
2414        }
2415
2416        public void setUseReadAheadInput(boolean flag) {
2417                this.mc.setUseReadAheadInput(flag);
2418        }
2419
2420        public void setUseSSL(boolean property) {
2421                this.mc.setUseSSL(property);
2422        }
2423
2424        public void setUseSSPSCompatibleTimezoneShift(boolean flag) {
2425                this.mc.setUseSSPSCompatibleTimezoneShift(flag);
2426        }
2427
2428        public void setUseServerPrepStmts(boolean flag) {
2429                this.mc.setUseServerPrepStmts(flag);
2430        }
2431
2432        public void setUseServerPreparedStmts(boolean flag) {
2433                this.mc.setUseServerPreparedStmts(flag);
2434        }
2435
2436        public void setUseSqlStateCodes(boolean flag) {
2437                this.mc.setUseSqlStateCodes(flag);
2438        }
2439
2440        public void setUseStreamLengthsInPrepStmts(boolean property) {
2441                this.mc.setUseStreamLengthsInPrepStmts(property);
2442        }
2443
2444        public void setUseTimezone(boolean property) {
2445                this.mc.setUseTimezone(property);
2446        }
2447
2448        public void setUseUltraDevWorkAround(boolean property) {
2449                this.mc.setUseUltraDevWorkAround(property);
2450        }
2451
2452        public void setUseUnbufferedInput(boolean flag) {
2453                this.mc.setUseUnbufferedInput(flag);
2454        }
2455
2456        public void setUseUnicode(boolean flag) {
2457                this.mc.setUseUnicode(flag);
2458        }
2459
2460        public void setUseUsageAdvisor(boolean useUsageAdvisorFlag) {
2461                this.mc.setUseUsageAdvisor(useUsageAdvisorFlag);
2462        }
2463
2464        public void setUtf8OutsideBmpExcludedColumnNamePattern(String regexPattern) {
2465                this.mc.setUtf8OutsideBmpExcludedColumnNamePattern(regexPattern);
2466        }
2467
2468        public void setUtf8OutsideBmpIncludedColumnNamePattern(String regexPattern) {
2469                this.mc.setUtf8OutsideBmpIncludedColumnNamePattern(regexPattern);
2470        }
2471
2472        public void setYearIsDateType(boolean flag) {
2473                this.mc.setYearIsDateType(flag);
2474        }
2475
2476        public void setZeroDateTimeBehavior(String behavior) {
2477                this.mc.setZeroDateTimeBehavior(behavior);
2478        }
2479
2480        public boolean useUnbufferedInput() {
2481                return this.mc.useUnbufferedInput();
2482        }
2483
2484        public void initializeExtension(Extension ex) throws SQLException {
2485                this.mc.initializeExtension(ex);
2486        }
2487
2488        public String getProfilerEventHandler() {
2489                return this.mc.getProfilerEventHandler();
2490        }
2491
2492        public void setProfilerEventHandler(String handler) {
2493                this.mc.setProfilerEventHandler(handler);
2494        }
2495
2496        public boolean getVerifyServerCertificate() {
2497                return this.mc.getVerifyServerCertificate();
2498        }
2499
2500        public void setVerifyServerCertificate(boolean flag) {
2501                this.mc.setVerifyServerCertificate(flag);
2502        }
2503
2504        public boolean getUseLegacyDatetimeCode() {
2505                return this.mc.getUseLegacyDatetimeCode();
2506        }
2507
2508        public void setUseLegacyDatetimeCode(boolean flag) {
2509                this.mc.setUseLegacyDatetimeCode(flag);
2510        }
2511
2512        public int getSelfDestructOnPingMaxOperations() {
2513                return this.mc.getSelfDestructOnPingMaxOperations();
2514        }
2515
2516        public int getSelfDestructOnPingSecondsLifetime() {
2517                return this.mc.getSelfDestructOnPingSecondsLifetime();
2518        }
2519
2520        public void setSelfDestructOnPingMaxOperations(int maxOperations) {
2521                this.mc.setSelfDestructOnPingMaxOperations(maxOperations);
2522        }
2523
2524        public void setSelfDestructOnPingSecondsLifetime(int seconds) {
2525                this.mc.setSelfDestructOnPingSecondsLifetime(seconds);
2526        }
2527
2528        public boolean getUseColumnNamesInFindColumn() {
2529                return this.mc.getUseColumnNamesInFindColumn();
2530        }
2531
2532        public void setUseColumnNamesInFindColumn(boolean flag) {
2533                this.mc.setUseColumnNamesInFindColumn(flag);
2534        }
2535
2536        public boolean getUseLocalTransactionState() {
2537                return this.mc.getUseLocalTransactionState();
2538        }
2539
2540        public void setUseLocalTransactionState(boolean flag) {
2541                this.mc.setUseLocalTransactionState(flag);
2542        }
2543       
2544        public boolean getCompensateOnDuplicateKeyUpdateCounts() {
2545                return this.mc.getCompensateOnDuplicateKeyUpdateCounts();
2546        }
2547
2548        public void setCompensateOnDuplicateKeyUpdateCounts(boolean flag) {
2549                this.mc.setCompensateOnDuplicateKeyUpdateCounts(flag);
2550        }
2551
2552        public boolean getUseAffectedRows() {
2553                return this.mc.getUseAffectedRows();
2554        }
2555
2556        public void setUseAffectedRows(boolean flag) {
2557                this.mc.setUseAffectedRows(flag);
2558        }
2559
2560        public String getPasswordCharacterEncoding() {
2561                return this.mc.getPasswordCharacterEncoding();
2562        }
2563
2564        public void setPasswordCharacterEncoding(String characterSet) {
2565                this.mc.setPasswordCharacterEncoding(characterSet);
2566        }
2567
2568        public int getAutoIncrementIncrement() {
2569                return this.mc.getAutoIncrementIncrement();
2570        }
2571
2572        public int getLoadBalanceBlacklistTimeout() {
2573                return this.mc.getLoadBalanceBlacklistTimeout();
2574        }
2575
2576        public void setLoadBalanceBlacklistTimeout(int loadBalanceBlacklistTimeout) {
2577                this.mc.setLoadBalanceBlacklistTimeout(loadBalanceBlacklistTimeout);
2578        }
2579        public int getLoadBalancePingTimeout() {
2580                return this.mc.getLoadBalancePingTimeout();
2581        }
2582
2583        public void setLoadBalancePingTimeout(int loadBalancePingTimeout) {
2584                this.mc.setLoadBalancePingTimeout(loadBalancePingTimeout);
2585        }
2586       
2587        public boolean getLoadBalanceValidateConnectionOnSwapServer() {
2588                return this.mc.getLoadBalanceValidateConnectionOnSwapServer();
2589        }
2590
2591        public void setLoadBalanceValidateConnectionOnSwapServer(
2592                        boolean loadBalanceValidateConnectionOnSwapServer) {
2593                this.mc.setLoadBalanceValidateConnectionOnSwapServer(loadBalanceValidateConnectionOnSwapServer);
2594        }
2595       
2596        public void setRetriesAllDown(int retriesAllDown) {
2597                this.mc.setRetriesAllDown(retriesAllDown);
2598        }
2599       
2600        public int getRetriesAllDown() {
2601                return this.mc.getRetriesAllDown();
2602        }
2603
2604        public ExceptionInterceptor getExceptionInterceptor() {
2605                return this.pooledConnection.getExceptionInterceptor();
2606        }
2607
2608        public String getExceptionInterceptors() {
2609                return this.mc.getExceptionInterceptors();
2610        }
2611
2612        public void setExceptionInterceptors(String exceptionInterceptors) {
2613                this.mc.setExceptionInterceptors(exceptionInterceptors);
2614        }
2615
2616        public boolean getQueryTimeoutKillsConnection() {
2617                return this.mc.getQueryTimeoutKillsConnection();
2618        }
2619
2620        public void setQueryTimeoutKillsConnection(
2621                        boolean queryTimeoutKillsConnection) {
2622                this.mc.setQueryTimeoutKillsConnection(queryTimeoutKillsConnection);
2623        }
2624
2625        public boolean hasSameProperties(Connection c) {
2626                return this.mc.hasSameProperties(c);
2627        }
2628       
2629        public Properties getProperties() {
2630                return this.mc.getProperties();
2631        }
2632
2633   public String getHost() {
2634      return this.mc.getHost();
2635   }
2636
2637   public void setProxy(MySQLConnection conn) {
2638      this.mc.setProxy(conn);
2639   }
2640
2641        public boolean getRetainStatementAfterResultSetClose() {
2642                return this.mc.getRetainStatementAfterResultSetClose();
2643        }
2644
2645   public int getMaxAllowedPacket() {
2646                return this.mc.getMaxAllowedPacket();
2647        }
2648   
2649        public String getLoadBalanceConnectionGroup() {
2650                return this.mc.getLoadBalanceConnectionGroup();
2651        }
2652
2653        public boolean getLoadBalanceEnableJMX() {
2654                return this.mc.getLoadBalanceEnableJMX();
2655        }
2656
2657        public String getLoadBalanceExceptionChecker() {
2658                return this.mc
2659                                .getLoadBalanceExceptionChecker();
2660        }
2661
2662        public String getLoadBalanceSQLExceptionSubclassFailover() {
2663                return this.mc
2664                                .getLoadBalanceSQLExceptionSubclassFailover();
2665        }
2666
2667        public String getLoadBalanceSQLStateFailover() {
2668                return this.mc
2669                                .getLoadBalanceSQLStateFailover();
2670        }
2671
2672        public void setLoadBalanceConnectionGroup(String loadBalanceConnectionGroup) {
2673                this.mc
2674                                .setLoadBalanceConnectionGroup(loadBalanceConnectionGroup);
2675               
2676        }
2677
2678        public void setLoadBalanceEnableJMX(boolean loadBalanceEnableJMX) {
2679                this.mc
2680                                .setLoadBalanceEnableJMX(loadBalanceEnableJMX);
2681               
2682        }
2683
2684        public void setLoadBalanceExceptionChecker(
2685                        String loadBalanceExceptionChecker) {
2686                this.mc
2687                                .setLoadBalanceExceptionChecker(loadBalanceExceptionChecker);
2688               
2689        }
2690
2691        public void setLoadBalanceSQLExceptionSubclassFailover(
2692                        String loadBalanceSQLExceptionSubclassFailover) {
2693                this.mc
2694                                .setLoadBalanceSQLExceptionSubclassFailover(loadBalanceSQLExceptionSubclassFailover);
2695               
2696        }
2697
2698        public void setLoadBalanceSQLStateFailover(
2699                        String loadBalanceSQLStateFailover) {
2700                this.mc
2701                                .setLoadBalanceSQLStateFailover(loadBalanceSQLStateFailover);
2702               
2703        }
2704
2705
2706        public String getLoadBalanceAutoCommitStatementRegex() {
2707                return this.mc.getLoadBalanceAutoCommitStatementRegex();
2708        }
2709
2710        public int getLoadBalanceAutoCommitStatementThreshold() {
2711                return this.mc.getLoadBalanceAutoCommitStatementThreshold();
2712        }
2713
2714        public void setLoadBalanceAutoCommitStatementRegex(
2715                        String loadBalanceAutoCommitStatementRegex) {
2716                this.mc.setLoadBalanceAutoCommitStatementRegex(loadBalanceAutoCommitStatementRegex);
2717               
2718        }
2719
2720        public void setLoadBalanceAutoCommitStatementThreshold(
2721                        int loadBalanceAutoCommitStatementThreshold) {
2722                this.mc.setLoadBalanceAutoCommitStatementThreshold(loadBalanceAutoCommitStatementThreshold);
2723               
2724        }
2725
2726        public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
2727                checkClosed();
2728
2729                try {
2730                        this.mc.setTypeMap(map);
2731                } catch (SQLException sqlException) {
2732                        checkAndFireConnectionError(sqlException);
2733                }
2734        }
2735
2736        public boolean getIncludeThreadDumpInDeadlockExceptions() {
2737                return this.mc.getIncludeThreadDumpInDeadlockExceptions();
2738        }
2739
2740        public void setIncludeThreadDumpInDeadlockExceptions(boolean flag) {
2741                this.mc.setIncludeThreadDumpInDeadlockExceptions(flag);
2742               
2743        }
2744
2745        public boolean getIncludeThreadNamesAsStatementComment() {
2746                return this.mc.getIncludeThreadNamesAsStatementComment();
2747        }
2748
2749        public void setIncludeThreadNamesAsStatementComment(boolean flag) {
2750                this.mc.setIncludeThreadNamesAsStatementComment(flag);
2751        }
2752
2753        public boolean isServerLocal() throws SQLException {
2754                return this.mc.isServerLocal();
2755        }
2756
2757        public void setAuthenticationPlugins(String authenticationPlugins) {
2758                this.mc.setAuthenticationPlugins(authenticationPlugins);
2759        }
2760
2761        public String getAuthenticationPlugins() {
2762                return this.mc.getAuthenticationPlugins();
2763        }
2764
2765        public void setDisabledAuthenticationPlugins(
2766                        String disabledAuthenticationPlugins) {
2767                this.mc.setDisabledAuthenticationPlugins(disabledAuthenticationPlugins);
2768        }
2769
2770        public String getDisabledAuthenticationPlugins() {
2771                return this.mc.getDisabledAuthenticationPlugins();
2772        }
2773
2774        public void setDefaultAuthenticationPlugin(
2775                        String defaultAuthenticationPlugin) {
2776                this.mc.setDefaultAuthenticationPlugin(defaultAuthenticationPlugin);
2777               
2778        }
2779
2780        public String getDefaultAuthenticationPlugin() {
2781                return this.mc.getDefaultAuthenticationPlugin();
2782        }
2783
2784        public void setParseInfoCacheFactory(String factoryClassname) {
2785                this.mc.setParseInfoCacheFactory(factoryClassname);
2786        }
2787
2788        public String getParseInfoCacheFactory() {
2789                return this.mc.getParseInfoCacheFactory();
2790        }
2791
2792        public void setSchema(String schema) throws SQLException {
2793                this.mc.setSchema(schema);
2794        }
2795
2796        public String getSchema() throws SQLException {
2797                return this.mc.getSchema();
2798        }
2799
2800        public void abort(Executor executor) throws SQLException {
2801                this.mc.abort(executor);
2802        }
2803
2804        public void setNetworkTimeout(Executor executor, int milliseconds)
2805                        throws SQLException {
2806                this.mc.setNetworkTimeout(executor, milliseconds);
2807        }
2808
2809        public int getNetworkTimeout() throws SQLException {
2810                return this.mc.getNetworkTimeout();
2811        }
2812}
Note: See TracBrowser for help on using the repository browser.