发布

  • - Rollback any open transactions when an error occurs in a SQL file.

    frostbyte_neo 发布于 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 yet when trying to use transactions with MySQL. START TRANSACTION now 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.sql file 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.header function 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_depth configuration option to limit the depth of recursion allowed in the run_sql function.
    • Fix a bug where the results of the JSON function in sqlite would be interpreted as a string instead of a json object.
    • Fix a bug where the sqlpage.environment_variable function would return an error if the environment variable was not set. Now it returns null instead.
    • Update ApexCharts to v4.3.0.
    • New article property in the text component to display text in a more readable, article-like format.
    • Add support for evaluating calls to coalesce inside sqlpage functions. This means you can now use coalesce inside arguments of sqlpage functions, and it will be evaluated inside sqlpage. For instance, this lets you call sqlpage.link(coalesce($url, 'https://sql-page.com')) to create a link that will use the value of $url if it is not null, or fallback to https://sql-page.com if it is null.
    • In the form component, allow the usage of the value property in checkboxes and radio buttons. The custom checked property 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 link property is provided.
    • When using the map component without a basemap, use a light background color that respects the theme color.
    下载附件