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

cast test change types in view protocol

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.4.31, 10.11, 10.5.22, 10.6.15, 10.10.6, 11.0.3, 11.1.2
    • N/A
    • Data types
    • None

    Description

      --- /home/sanja/maria/git/10.4/mysql-test/main/cast.result	2023-10-12 21:10:39.670952976 +0200
      +++ /home/sanja/maria/git/10.4/mysql-test/main/cast.reject	2023-10-12 21:12:36.415207337 +0200
      @@ -402,7 +402,7 @@
       cast(_latin1'test' as char character set latin2)
       test
       select cast(_koi8r'����' as char character set cp1251);
      -cast(_koi8r'\xD4\xC5\xD3\xD4' as char character set cp1251)
      +cast(_koi8r'ÔÅÓÔ' as char character set cp1251)
       ����
       create table t1 select cast(_koi8r'����' as char character set cp1251) as t;
       show create table t1;
      @@ -418,15 +418,15 @@
       cast(_latin1'a  ' AS char(2)) as c4,
       hex(cast(_latin1'a'   AS char(2))) as c5;
       c1	c2	c3	c4	c5
      -ab	a 	ab	a 	6100
      +ab	a 	ab	a 	61
       Warnings:
      -Warning	1292	Truncated incorrect BINARY(2) value: 'abc'
      -Warning	1292	Truncated incorrect BINARY(2) value: 'a  '
      +Warning	1292	Truncated incorrect CHAR(2) value: 'abc'
      +Warning	1292	Truncated incorrect CHAR(2) value: 'a  '
       select cast(1000 as CHAR(3));
       cast(1000 as CHAR(3))
       100
       Warnings:
      -Warning	1292	Truncated incorrect BINARY(3) value: '1000'
      +Warning	1292	Truncated incorrect CHAR(3) value: '1000'
       SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
       create table t1 select
       cast(_latin1'ab'  AS char)    as c1,
      @@ -521,9 +521,9 @@
       aab	aab
       aaa	aaa
       Warnings:
      -Warning	1292	Truncated incorrect BINARY(2) value: 'aaa'
      -Warning	1292	Truncated incorrect BINARY(2) value: 'aab'
      -Warning	1292	Truncated incorrect BINARY(2) value: 'aac'
      +Warning	1292	Truncated incorrect CHAR(2) value: 'aaa'
      +Warning	1292	Truncated incorrect CHAR(2) value: 'aab'
      +Warning	1292	Truncated incorrect CHAR(2) value: 'aac'
       SELECT a, CAST(a AS UNSIGNED) FROM t1 ORDER BY CAST(a AS CHAR) ;
       a	CAST(a AS UNSIGNED)
       aaa	3
      @@ -535,9 +535,9 @@
       aab	aa
       aac	aa
       Warnings:
      -Warning	1292	Truncated incorrect BINARY(2) value: 'aaa'
      -Warning	1292	Truncated incorrect BINARY(2) value: 'aab'
      -Warning	1292	Truncated incorrect BINARY(2) value: 'aac'
      +Warning	1292	Truncated incorrect CHAR(2) value: 'aaa'
      +Warning	1292	Truncated incorrect CHAR(2) value: 'aab'
      +Warning	1292	Truncated incorrect CHAR(2) value: 'aac'
       DROP TABLE t1;
       select date_add(cast('2004-12-30 12:00:00' as date), interval 0 hour);
       date_add(cast('2004-12-30 12:00:00' as date), interval 0 hour)
      @@ -819,19 +819,19 @@
       drop table t1;
       select collation(cast("a" as char(10) binary));
       collation(cast("a" as char(10) binary))
      -latin1_bin
      +latin1_swedish_ci
       select collation(cast("a" as char(10) charset utf8 binary));
       collation(cast("a" as char(10) charset utf8 binary))
      -utf8_bin
      +utf8_general_ci
       select collation(cast("a" as char(10) ascii binary));
       collation(cast("a" as char(10) ascii binary))
      -latin1_bin
      +latin1_swedish_ci
       select collation(cast("a" as char(10) binary charset utf8));
       collation(cast("a" as char(10) binary charset utf8))
      -utf8_bin
      +utf8_general_ci
       select collation(cast("a" as char(10) binary ascii));
       collation(cast("a" as char(10) binary ascii))
      -latin1_bin
      +latin1_swedish_ci
       #
       # MDEV-11030 Assertion `precision > 0' failed in decimal_bin_size
       #
      @@ -1323,9 +1323,9 @@
       DROP TABLE t1;
       SELECT CAST(-1e0 AS UNSIGNED);
       CAST(-1e0 AS UNSIGNED)
      -0
      +18446744073709551615
       Warnings:
      -Note	1916	Got overflow when converting '-1' to UNSIGNED BIGINT. Value truncated
      +Note	1105	Cast to unsigned converted negative integer to it's positive complement
       CREATE TABLE t1 (a BIGINT UNSIGNED);
       INSERT INTO t1 VALUES (-1e0);
       Warnings:
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              sanja Oleksandr Byelkin
              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.