aleitner commented on code in PR #821:
URL: https://github.com/apache/guacamole-client/pull/821#discussion_r1158959885
##########
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/java/org/apache/guacamole/auth/mysql/conf/MySQLEnvironment.java:
##########
@@ -104,6 +104,12 @@ public class MySQLEnvironment extends JDBCEnvironment {
* The default SSL mode for connecting to MySQL servers.
*/
private final MySQLSSLMode DEFAULT_SSL_MODE = MySQLSSLMode.PREFERRED;
+
+ /**
+ * The default maximum number of identifiers/parameters to be included in
a
+ * single batch when executing SQL statements.
+ */
+ private static final int DEFAULT_BATCH_SIZE = 2147483647;
Review Comment:
It looks like MySQL and MariaDB have a limitation on the maximum size of the
SQL query, which is determined by the 1max_allowed_packet1 system variable.
This variable defines the maximum packet size that the server can send or
receive. I could change the code to using this value with some calculation to
determine a batch size
##########
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/java/org/apache/guacamole/auth/mysql/conf/MySQLEnvironment.java:
##########
@@ -104,6 +104,12 @@ public class MySQLEnvironment extends JDBCEnvironment {
* The default SSL mode for connecting to MySQL servers.
*/
private final MySQLSSLMode DEFAULT_SSL_MODE = MySQLSSLMode.PREFERRED;
+
+ /**
+ * The default maximum number of identifiers/parameters to be included in
a
+ * single batch when executing SQL statements.
+ */
+ private static final int DEFAULT_BATCH_SIZE = 2147483647;
Review Comment:
It looks like MySQL and MariaDB have a limitation on the maximum size of the
SQL query, which is determined by the `max_allowed_packet` system variable.
This variable defines the maximum packet size that the server can send or
receive. I could change the code to using this value with some calculation to
determine a batch size
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]