ChristopherSchultz commented on PR #596:
URL: https://github.com/apache/tomcat/pull/596#issuecomment-1462052065

   > @ChristopherSchultz Is there a list of supported database systems with 
which the DataSourceStore is compatible? Are you sure that they all support 
"SELECT FOR UPDATE"? I tried to look that up and the "best" thing I found was 
https://www.sql-workbench.eu/dbms_comparison.html
   
   Good question. I was originally going to use `MERGE` but the database I have 
at-hand (MariaDB) doesn't support it, so I went with `SELECT...FOR UPDATE`. 
It's not clear to me if the `SELECT...FOR UPDATE NOWAIT` listed in that table 
is specifically talking about the `NOWAIT` part of the query. For example, I 
know that both MariaDB and MySQL have supported `SELECT...FOR UPDATE` for a 
long time, but the entry for MySQL states "_Since 8.0_" and MariaDB says 
"_No_". A quick check of the [HSQLDB 
Documentation](http://hsqldb.org/doc/2.0/guide/dataaccess-chapt.html#dac_jdbc_cursor_updatability)
 shows that `SELECT...FOR UPDATE` is available while that list claims it is not 
supported. Same thing with [IBM 
DB2](https://www.ibm.com/docs/en/informix-servers/12.10?topic=statement-update-clause)
 and [SQL 
Server](https://learn.microsoft.com/en-us/sql/odbc/reference/appendixes/processing-select-for-update-statements?view=sql-server-ver16).
 But it's clear that not all RDMBSs support that syntax.
   
   Maybe it's not possible to write a single code-path to satisfy all major 
RDBMS systems. I'd be happy to change the PR to offer a selection between the 
two via configuration.


-- 
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: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to