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

The result returned by COERCIBILITY() is inconsistent with the documentation.

    XMLWordPrintable

Details

    Description

      The document shows :

      per docs

      SELECT COERCIBILITY(CAST(1 AS CHAR));
      +-------------------------------+
      | COERCIBILITY(CAST(1 AS CHAR)) |
      +-------------------------------+
      |                             2 |
      +-------------------------------+
       
      SELECT COERCIBILITY('abc');
      +---------------------+
      | COERCIBILITY('abc') |
      +---------------------+
      |                   4 |
      +---------------------+
       
      SELECT COERCIBILITY(1);
      +-----------------+
      | COERCIBILITY(1) |
      +-----------------+
      |               5 |
      +-----------------+
       
      SELECT COERCIBILITY(NULL);
      +--------------------+
      | COERCIBILITY(NULL) |
      +--------------------+
      |                  6 |
      +--------------------+
      

      However, my actual execution result is as follows:

      actual testing

      +-------------------------------+
      | COERCIBILITY(CAST(1 AS CHAR)) |
      +-------------------------------+
      |                             4 |
      +-------------------------------+
      +---------------------+
      | COERCIBILITY('abc') |
      +---------------------+
      |                   6 |
      +---------------------+
      +-----------------+
      | COERCIBILITY(1) |
      +-----------------+
      |               7 |
      +-----------------+
      +--------------------+
      | COERCIBILITY(NULL) |
      +--------------------+
      |                  8 |
      +--------------------+
      

      Attachments

        Issue Links

          Activity

            People

              maxmether Max Mether
              mu mu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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