Skip to content

Commit 4db695e

Browse files
committedJul 29, 2021
[misc] code improvement
1 parent e45b96b commit 4db695e

File tree

162 files changed

+852
-1588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+852
-1588
lines changed
 

‎CHANGELOG.md

+27-27
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ If really wanting to use JDK logger, System property "mariadb.logging.fallback"
3131

3232

3333
### Failover
34-
Failover implementation now permit to redo transaction :
35-
when creating a transaction, all command will be cached, and can be replay in case of failover.
34+
Failover implementation now permit redoing transaction :
35+
when creating a transaction, all command will be cached, and can be replayed in case of failover.
3636

3737
This functionality can be enabled using option `transactionReplay`.
3838

@@ -87,7 +87,7 @@ minor:
8787
## [2.7.0](https://github.com/mariadb-corporation/mariadb-connector-j/tree/2.7.0) (24 Sep. 2020)
8888
[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/compare/2.6.2...2.7.0)
8989

90-
* CONJ-805 maxFieldSize string truncation occurs on bytes length, not character length
90+
* CONJ-805 maxFieldSize string truncation occurs on bytes' length, not character length
9191
* CONJ-807 Correcting possible Get Access Denied error if using multiple classloader
9292
* CONJ-810 normalization of resultset getDate/getTime of timestamp field.
9393
* CONJ-812 DatabaseMetadata.getBestRowIdentifier and getMaxProcedureNameLength correction
@@ -148,7 +148,7 @@ minor:
148148
[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/compare/2.5.3...2.5.4)
149149

150150
* CONJ-756 - Logging correction when using enablePacketDebug option
151-
* CONJ-755 - permits to avoid setting session_track_schema with new option `trackSchema`
151+
* CONJ-755 - permits avoiding setting session_track_schema with new option `trackSchema`
152152

153153
## [2.5.3](https://github.com/mariadb-corporation/mariadb-connector-j/tree/2.5.3) (07 Jan. 2020)
154154
[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/compare/2.5.2...2.5.3)
@@ -182,8 +182,8 @@ minor:
182182
* CONJ-727 - Support configuration of custom SSLSocketFactory
183183
* CONJ-561 - JDBC 4.3 partial implementation java.sql.Statement methods isSimpleIdentifier, enquoteIdentifier, enquoteLiteral and enquoteNCharLiteral
184184
* CONJ-692 - ConnectionPoolDataSource interface addition to MariaDbPoolDataSource
185-
* CONJ-563 - closing possible option batch thread on driver deregistration.
186-
* CONJ-732 - Driver getPropertyInfo returns no options information when url is empty
185+
* CONJ-563 - closing possible option batch thread on driver registration.
186+
* CONJ-732 - Driver getPropertyInfo returns no options' information when url is empty
187187
* CONJ-734 - DatabaseMetaData.getSchemaTerm now return "schema", not empty string
188188

189189
## [2.4.4](https://github.com/mariadb-corporation/mariadb-connector-j/tree/2.4.4) (14 Sep. 2019)
@@ -295,7 +295,7 @@ Connecting MySQL community server use YaSSL without correction, and connection m
295295
Using useBulkStmts permit faster batch, but cause one major issue : Batch return -1 = SUCCESS_NO_INFO
296296

297297
Different option use this information for optimistic update, and cannot confirm if update succeed or not.
298-
This option still makes sense, since for big batch is way more faster, but will not be activated by default.
298+
This option still makes sense, since for big batch is way faster, but will not be activated by default.
299299

300300

301301
##= Minor change:
@@ -319,7 +319,7 @@ minor change:
319319

320320
New options
321321
|=useAffectedRows|default correspond to the JDBC standard, reporting real affected rows. if
322-
enable, will report "affected" rows. example : if enable, an update command that doesn't change a row value will still be "affected", then report.<br /><i>Default: false. Since 2.2.6</i>
322+
enable, will report "affected" rows. example : if enabled, an update command that doesn't change a row value will still be "affected", then report.<br /><i>Default: false. Since 2.2.6</i>
323323

324324
Bug correction:
325325
* CONJ-624 - MariaDbPoolDataSource possible NPE on configuration getter
@@ -349,7 +349,7 @@ Bug correction:
349349
Minor changes:
350350
* CONJ-580 - Some options are missing in documentation like default 'autocommit' value
351351
* CONJ-597 - Internal exchanges send utf8mb4 with server even if default server collation is not utf8/utf8mb4
352-
* CONJ-600 - Upgrading non mandatory Waffle dependency to 1.9.0 (windows GSSAPI authentication)
352+
* CONJ-600 - Upgrading non-mandatory Waffle dependency to 1.9.0 (windows GSSAPI authentication)
353353
* CONJ-575 - test addition to ensure YaSSL downgrade TLSv1.2 protocol to TLSv1.1
354354

355355
## [2.2.3](https://github.com/mariadb-corporation/mariadb-connector-j/tree/2.2.3) (08 Mar. 2018)
@@ -359,7 +359,7 @@ Bug correction:
359359
* CONJ-583 - possible hang indefinitely using master/slave configuration and failover occur
360360
* CONJ-586 - erroneous transaction state when first command result as error
361361
* CONJ-587 - using allowMasterDownConnection option can lead to NPE when using setReadOnly()
362-
* CONJ-588 - using option 'allowMasterDownConnection' won't permit to connect if master is down
362+
* CONJ-588 - using option 'allowMasterDownConnection' won't permit connecting if master is down
363363
* CONJ-534 - Connection.isValid() must be routed to Master and Slave connections to avoid any server timeout
364364

365365
## [2.2.2](https://github.com/mariadb-corporation/mariadb-connector-j/tree/2.2.2) (20 Feb. 2018)
@@ -511,7 +511,7 @@ other evolution
511511

512512
Bug
513513
* CONJ-502 - isolation leak when using multiple pools on same VM on failover
514-
* CONJ-503 - regression on aurora Connection Connection.isReadOnly()
514+
* CONJ-503 - regression on aurora Connection.isReadOnly()
515515
* CONJ-505 - correcting issue that ended throwing "Unknown prepared statement handler given to mysqld_stmt_execute"
516516
* CONJ-496 - return rounded numeric when querying on a decimal field in place of throwing an exception for compatibility
517517

@@ -556,7 +556,7 @@ Task
556556
* CONJ-465 - new option "enablePacketDebug"
557557

558558
New Options :
559-
|=enablePacketDebug|Driver will save the last 16 MySQL packet exchanges (limited to first 1000 bytes).<br />Hexadecimal value of those packet will be added to stacktrace when an IOException occur.<br />This options has no performance incidence (< 1 microseconds per query) but driver will then take 16kb more memory.//Default: true. Since 1.6.0//|
559+
|=enablePacketDebug|Driver will save the last 16 MySQL packet exchanges (limited to first 1000 bytes).<br />Hexadecimal value of this packet will be added to stacktrace when an IOException occur.<br />This options has no performance incidence (< 1 microseconds per query) but driver will then take 16kb more memory.//Default: true. Since 1.6.0//|
560560

561561
* CONJ-468 - autoIncrementIncrement value loaded during connection, avoiding a query for first statement for rewrite
562562

@@ -591,11 +591,11 @@ will be executed on close, to avoid having to parse all remaining results.
591591

592592
##= [CONJ-442]
593593
Memory optimization : streaming query.
594-
Very big command now doesn't use any intermediate buffer. Commands are send directly to socket avoiding using memory, This permit to send very large object (1G) without using any additional memory.
594+
Very big command now doesn't use any intermediate buffer. Commands are sent directly to socket avoiding using memory, This permit to send very large object (1G) without using any additional memory.
595595

596596
##= [CONJ-366]
597597
Faster connection : bundle first commands in authentication packet
598-
Driver execute different command on connection. Those queries are now send using pipeline (all queries are send, then only all results are reads).
598+
Driver execute different command on connection. Those queries are now send using pipeline (all queries are sent, then only all results are reads).
599599

600600
New Options :
601601
|=usePipelineAuth|Fast connection creation.//Default: true. Since 2.0.0//|
@@ -605,7 +605,7 @@ Parsing row result optimisation to avoid creating byte array to the maximum for
605605

606606
##= Remaining JDBC 4.2 missing implementation :
607607
- CONJ-414 - support for large update count [CONJ-414]
608-
- CONJ-409 - PrepareStatement.setObject(...) support for with java 8 temporal temporal object.
608+
- CONJ-409 - PrepareStatement.setObject(...) support for with java 8 temporal object.
609609
- CONJ-411 - support for Statement maxFieldSize
610610

611611
##= Misc
@@ -632,9 +632,9 @@ Parsing row result optimisation to avoid creating byte array to the maximum for
632632
* CONJ-434 : 1.5.8 regression : ResultSet returns duplicate entries when using fetchsize
633633
* CONJ-437 : ResultSet.getString on field with ZEROFILL doesn't have the '0' leading chars when using binary protocol
634634
* CONJ-435 : avoid "All pipe instances are busy" exception on multiple connections to the same named pipe
635-
* CONJ-446 : ResultSet first() throw an exception for scroll type if TYPE_FORWARD_ONLY only when streaming
635+
* CONJ-446 : ResultSet first() throw an exception for scroll type if TYPE_FORWARD_ONLY when streaming
636636
* CONJ-440 : handle very big COM_STMT_SEND_LONG_DATA packet (1Gb)
637-
* CONJ-429 : ResultSet.getDouble/getFloat may throws a NumberFormatException
637+
* CONJ-429 : ResultSet.getDouble/getFloat may throw a NumberFormatException
638638
* CONJ-438 : using option rewriteBatchedStatements, permit rewrite when query has column/table that contain 'select' keyword.
639639

640640
## 1.5.8
@@ -690,7 +690,7 @@ Parsing row result optimisation to avoid creating byte array to the maximum for
690690
* CONJ-354 : Streaming issue when using procedures in PrepareStatement/Statement
691691
* CONJ-345 : Regression with using COLLATE keyword in PrepareStatement query
692692
* CONJ-352 : metadata correction on getPrecision() for numeric fields
693-
* CONJ-350 : make prepare fallback to client prepare if query cannot be prepare
693+
* CONJ-350 : make prepare fallback to client prepare if query cannot be prepared
694694

695695
## 1.5.2
696696
Release version
@@ -714,7 +714,7 @@ Aurora now auto discover nodes from cluster endpoint.
714714

715715
##### Aurora endpoints
716716

717-
Every aurora instance has a specific endpoint, i.e. an URL that identify the host. Those endpoints look like `xxx.yyy.zzz.rds.amazonaws.com`.
717+
Every aurora instance has a specific endpoint, i.e. a URL that identify the host. Those endpoints look like `xxx.yyy.zzz.rds.amazonaws.com`.
718718

719719
There is another endpoint named "cluster endpoint" (format `xxx.cluster-yyy.zzz.rds.amazonaws.com`) which is assigned to the current master instance and will change when a new master is promoted.
720720

@@ -729,7 +729,7 @@ jdbc:mariadb:aurora://xxx.cluster-yyy.zzz.rds.amazonaws.com/db
729729

730730
Driver will automatically discover master and slaves of this cluster from current cluster end-point during connection time. This permit to add new replicas to the cluster instance will be discovered without changing driver configuration.
731731

732-
This discovery append at connection time, so if you are using pool framework, check if this framework as a property that controls the maximum lifetime of a connection in the pool, and set a value to avoid infinite lifetime. When this lifetime is reached, pool will discarded the current connection, and create a new one (if needed). New connections will use the new replicas.
732+
This discovery append at connection time, so if you are using pool framework, check if this framework as a property that controls the maximum lifetime of a connection in the pool, and set a value to avoid infinite lifetime. When this lifetime is reached, pool will discard the current connection, and create a new one (if needed). New connections will use the new replicas.
733733
(If connections are never discarded, new replicas will begin be used only when a failover occur)
734734

735735

@@ -743,14 +743,14 @@ Release candidate version
743743
CONJ-295.<br />
744744

745745
Java kerberos implementation is not well implemented with windows :
746-
* need a windows registry entry (HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters\AllowTGTSessionKey) so windows shared current ticket to java.
746+
* need a Windows registry entry (HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters\AllowTGTSessionKey) so windows shared current ticket to java.
747747
* java kinit must be executed to create a Ticket.
748748
* restriction when client with local admin rights
749749
* ...
750750

751-
[see openJDK issue](https://bugs.openjdk.java.net/browse/JDK-6722928) for more informations
751+
[see openJDK issue](https://bugs.openjdk.java.net/browse/JDK-6722928) for more information
752752

753-
Kerberos GSSAPI implementation on windows in now based on [Waffle](https://github.com/dblock/waffle) that support windows SSPI based on [JNA](https://github.com/java-native-access/jna).<br />
753+
Kerberos GSSAPI implementation on Windows in now based on [Waffle](https://github.com/dblock/waffle) that support windows SSPI based on [JNA](https://github.com/java-native-access/jna).<br />
754754
if waffle-jna (and dependencies) is on classpath, native implementation will automatically be used.
755755

756756
This removes all those problems
@@ -767,7 +767,7 @@ MariaDB server from version 10.0.15 is using the openSSL library permitting TLSv
767767

768768
TLSv1.2 can be enabled by setting option {{{enabledSslProtocolSuites}}} to values {{{"TLSv1, TLSv1.1, TLSv1.2"}}}.
769769

770-
A new option {{{enabledSslCipherSuites}}} permit to set specific cipher.
770+
A new option {{{enabledSslCipherSuites}}} permit setting specific cipher.
771771

772772
New Options :
773773
|=enabledSslProtocolSuites|Force TLS/SSL protocol to a specific set of TLS versions (comma separated list). <br />Example : "TLSv1, TLSv1.1, TLSv1.2"<br />//Default: TLSv1, TLSv1.1. Since 1.5.0//|
@@ -790,7 +790,7 @@ Basically that permit to avoid a lot of 'ping-pong' between driver and server.
790790

791791
New Options :
792792
|=useBatchMultiSend|PreparedStatement.executeBatch() will send many QUERY before reading result packets.//Default: true. Since 1.5.0//|
793-
|=useBatchMultiSendNumber|When using useBatchMultiSend, indicate maximum query that can be send at a time.<br />//Default: 100. Since 1.5.0//|
793+
|=useBatchMultiSendNumber|When using useBatchMultiSend, indicate maximum query that can be sent at a time.<br />//Default: 100. Since 1.5.0//|
794794

795795
### Prepare + execute in one call
796796
CONJ-296
@@ -809,7 +809,7 @@ Driver is using this functionality to PREPARE and EXECUTE in one client-server r
809809

810810
### Client logging
811811

812-
Client logging can be enable, permitting to log query information, execution time and different failover information.
812+
Client logging can be enabled, permitting to log query information, execution time and different failover information.
813813
This implementation need the standard SLF4J dependency.
814814

815815
New Options :
@@ -848,7 +848,7 @@ return filePath.equals("/var/tmp/exchanges");
848848
}}}
849849
file META-INF/services/org.mariadb.jdbc.LocalInfileInterceptor must exist with content {{{org.project.LocalInfileInterceptorImpl}}}.
850850

851-
You can get ride of defining the META-INF/services file using [[https://github.com/google/auto/tree/master/service|google auto-service]] framework, permitting to use annotation {{{@AutoService(LocalInfileInterceptor.class)}}} that will register the implementation as a service automatically.
851+
You can get rid of defining the META-INF/services file using [[https://github.com/google/auto/tree/master/service|google auto-service]] framework, permitting to use annotation {{{@AutoService(LocalInfileInterceptor.class)}}} that will register the implementation as a service automatically.
852852

853853
Using the previous example:
854854
{{{

‎CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Each pull request should address a single issue, and contain both the fix as well as a description of how the pull request and tests that validate that the PR fixes the issue in question.
3+
Each pull request should address a single issue, and contain both the fix and a description of how the pull request and tests that validate that the PR fixes the issue in question.
44

55
For significant feature additions, we like to have an open issue in [MariaDB JIRA](https://mariadb.atlassian.net/secure/RapidBoard.jspa?projectKey=CONJ). It is expected that discussion will have taken place in the attached issue.
66

@@ -32,7 +32,7 @@ so you can run
3232
mvn test
3333
```
3434

35-
You can change those parameter by adding -DdbUrl parameter. like :
35+
You can change this parameter by adding -DdbUrl parameter. like :
3636

3737
```script
3838
mvn test -DdbUrl=jdbc:mariadb://127.0.0.1:3306/testj?user=root&password=*****

0 commit comments

Comments
 (0)