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

Vector-related error messages worth improving when possible

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • 11.7.2
    • Vector search
    • None

    Description

      1. ER_TRUNCATED_WRONG_VALUE_FOR_FIELD

      bb-11.6-MDEV-32887-vector 764592a4da2a1b490471732fbefe2ce745ce1f32

      MariaDB [test]> create or replace table t (a vector(64) not null default '');
      ERROR 1366 (22007): Incorrect vector value: '''' for column `(null)`.`(null)`.`a` at row 0
      MariaDB [test]> show warnings;
      +-------+------+------------------------------------------------------------------------+
      | Level | Code | Message                                                                |
      +-------+------+------------------------------------------------------------------------+
      | Error | 1366 | Incorrect vector value: '''' for column `(null)`.`(null)`.`a` at row 0 |
      | Error | 1067 | Invalid default value for 'a'                                          |
      +-------+------+------------------------------------------------------------------------+
      2 rows in set (0.000 sec)
      

      We have a similar case with for example INET6, but there are differences: first, the "top" error there is 1067, I don't know if it's correct, but at least it looks better; and secondly, `(null)` for schema/table looks even uglier than `` (although not by much).

      MariaDB [test]> create or replace table t (a inet6 not null default '');
      ERROR 1067 (42000): Invalid default value for 'a'
      MariaDB [test]> show warnings;
      +---------+------+---------------------------------------------------------+
      | Level   | Code | Message                                                 |
      +---------+------+---------------------------------------------------------+
      | Warning | 1292 | Incorrect inet6 value: '' for column ``.``.`a` at row 0 |
      | Error   | 1067 | Invalid default value for 'a'                           |
      +---------+------+---------------------------------------------------------+
      2 rows in set (0.000 sec)
      


      TBC.

      Attachments

        Issue Links

          Activity

            It looks like this was fixed or changed on its own, at least the part about the "top" error message:

            7fce19bd215ac0671855044520092aa4210049d1

            MariaDB [test]> create or replace table t (a vector(64) not null default '');
            ERROR 1067 (42000): Invalid default value for 'a'
            MariaDB [test]> show warnings;
            +---------+------+----------------------------------------------------------------------+
            | Level   | Code | Message                                                              |
            +---------+------+----------------------------------------------------------------------+
            | Warning | 1366 | Incorrect vector value: '' for column `(null)`.`(null)`.`a` at row 0 |
            | Error   | 1067 | Invalid default value for 'a'                                        |
            +---------+------+----------------------------------------------------------------------+
            2 rows in set (0.000 sec)
            

            (null) instead of an empty string remains, but I guess it's not really important, it is ugly either way.

            elenst Elena Stepanova added a comment - It looks like this was fixed or changed on its own, at least the part about the "top" error message: 7fce19bd215ac0671855044520092aa4210049d1 MariaDB [test]> create or replace table t (a vector(64) not null default '' ); ERROR 1067 (42000): Invalid default value for 'a' MariaDB [test]> show warnings; + ---------+------+----------------------------------------------------------------------+ | Level | Code | Message | + ---------+------+----------------------------------------------------------------------+ | Warning | 1366 | Incorrect vector value: '' for column `( null )`.`( null )`.`a` at row 0 | | Error | 1067 | Invalid default value for 'a' | + ---------+------+----------------------------------------------------------------------+ 2 rows in set (0.000 sec) (null) instead of an empty string remains, but I guess it's not really important, it is ugly either way.

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.