-
- Rollback any open transactions when an error occurs in a SQL file.
发布于
2024-12-28 23:36:00 +00:00 | 1012 次提交 在此版本后已推送到 main- Previously, if an error occurred in the middle of a transaction, the transaction would be left open, and the connection would be returned to the pool. The next request could get a connection with an open half-completed transaction, which could lead to hard to debug issues.
- This allows safely using features that require a transaction, like
-
BEGIN; CREATE TEMPORARY TABLE t (x int) ON COMMIT DROP; -- postgres syntax -- do something with t -- previously, if an error occurred, the transaction would be left open, and the connection returned to the pool. -- the next request could get a connection where the table `t` still exists, leading to a new hard to debug error. COMMIT; - This will now automatically rollback the transaction, even if an error occurs in the middle of it.
-
- Fix a bug where one additional SQL statement was executed after an error occurred in a SQL file. This could cause surprising unexpected behavior.
-
insert into t values ($invalid_value); -- if this statement fails, ... insert into t values (42); -- this next statement should not be executed
-
- Fix
error returned from database: 1295 (HY000): This command is not supported in the prepared statement protocol yetwhen trying to use transactions with MySQL.START TRANSACTIONnow works as expected in MySQL. - Fix a bug where a multi-select dropdown would unexpectedly open when the form was reset.
- Add a new optional
sqlpage/on_reset.sqlfile that can be used to execute some SQL code after the end of each page execution.- Useful to reset a connection to the database after each request.
- Fix a bug where the
sqlpage.headerfunction would not work with headers containing uppercase letters. - Fix a bug where the table component would not sort columns that contained a space in their name.
- Fix a bug where stacked bar charts would not stack the bars correctly in some cases.
- Update ApexCharts to v4.1.0.
- Temporarily disable automatic tick amount calculation in the chart component. This was causing issues with mislabeled x-axis data, because of a bug in ApexCharts.
- Add a new
max_recursion_depthconfiguration option to limit the depth of recursion allowed in therun_sqlfunction. - Fix a bug where the results of the
JSONfunction in sqlite would be interpreted as a string instead of a json object. - Fix a bug where the
sqlpage.environment_variablefunction would return an error if the environment variable was not set. Now it returnsnullinstead. - Update ApexCharts to v4.3.0.
- New
articleproperty in the text component to display text in a more readable, article-like format. - Add support for evaluating calls to
coalesceinside sqlpage functions. This means you can now usecoalesceinside arguments of sqlpage functions, and it will be evaluated inside sqlpage. For instance, this lets you callsqlpage.link(coalesce($url, 'https://sql-page.com'))to create a link that will use the value of$urlif it is not null, or fallback tohttps://sql-page.comif it is null. - In the form component, allow the usage of the
valueproperty in checkboxes and radio buttons. The customcheckedproperty still works, but it is now optional. - Updated the welcome message displayed on the terminal when starting the server to be friendlier and more helpful.
- Display the page footer (by default:
Built with SQLPage) at the bottom of the page instead of immediately after the main content. - Improve links in the list component: The entire list item is now clickable, when a
linkproperty is provided. - When using the map component without a basemap, use a light background color that respects the theme color.
下载附件