Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6421

SQL_ERROR_LOG doesn't log comments in Events

    XMLWordPrintable

Details

    • 10.1.11

    Description

      With the SQL error log enabled:

      DELIMITER ||
      CREATE EVENT e1
      	ON SCHEDULE EVERY 10 SECOND
      DO BEGIN
      	START TRANSACTION;
      	INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */;
      	COMMIT;
      END;
      ||
      DELIMITER ;

      The statement is wrong, and is written into SQL_ERROR_LOG. But '/* e1 */' is not logged. The comment is preserved in the event source, though:

      MariaDB [test]> SHOW CREATE EVENT e1 \G
      *************************** 1. row ***************************
                     Event: e1
                  sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
                 time_zone: SYSTEM
              Create Event: CREATE DEFINER=`root`@`localhost` EVENT `e1` ON SCHEDULE EVERY 10 SECOND STARTS '2014-07-06 10:42:40' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
      START TRANSACTION;
      INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */ ;
      COMMIT;
      END
      character_set_client: utf8
      collation_connection: utf8_general_ci
        Database Collation: utf8_general_ci
      1 row in set (0.00 sec)

      The reason why this is a problem, is that there is not easy way to see events errors. Logging these errors into the SQL_ERROR_LOG would be very useful, if we could filter the entries based on a comment. Without this ability, that log is probably too big.

      Alternative request: ability to write the scheduler's SQL errors into a separate log. Both solutions would be equally good from my point of view.

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              f_razzoli Federico Razzoli
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.