mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
1. When mixing NULL to a character string,
the result takes its charset/collation attributes from the character string, e.g. SELECT func(NULL, _latin2'string') now returns a latin2 result. This is done by introducing a new derivation (aka coercibility) level DERIVATION_IGNORABLE, which is used with Item_null. 2. 'Pure' NULL is now BINARY(0), not CHAR(0). I.e. NULL is now more typeless. mysql-test/r/metadata.result: Fixing test results: CHAR(0) -> BINARY(0) for NULLs mysql-test/r/null.result: Testing mixing NULL with a character string with a number of functions. mysql-test/r/ps_2myisam.result: Fixing test results: CHAR(0) -> BINARY(0) for NULLs mysql-test/r/ps_3innodb.result: Fixing test results: CHAR(0) -> BINARY(0) for NULLs mysql-test/r/ps_4heap.result: Fixing test results: CHAR(0) -> BINARY(0) for NULLs mysql-test/r/ps_5merge.result: Fixing test results: CHAR(0) -> BINARY(0) for NULLs mysql-test/r/ps_6bdb.result: Fixing test results: CHAR(0) -> BINARY(0) for NULLs mysql-test/r/ps_7ndb.result: Fixing test results: CHAR(0) -> BINARY(0) for NULLs mysql-test/t/null.test: Testing mixing NULL with a character string with a number of functions. sql/item.cc: New derivation level. sql/item.h: New derivation level.
This commit is contained in:
parent
fdc79aa30a
commit
c5e6941e75
11 changed files with 181 additions and 17 deletions
|
|
@ -1713,7 +1713,7 @@ t5 CREATE TABLE `t5` (
|
|||
`param10` bigint(20) default NULL,
|
||||
`const11` int(4) default NULL,
|
||||
`param11` bigint(20) default NULL,
|
||||
`const12` char(0) default NULL,
|
||||
`const12` binary(0) default NULL,
|
||||
`param12` bigint(20) default NULL,
|
||||
`param13` double default NULL,
|
||||
`param14` longtext,
|
||||
|
|
@ -1743,7 +1743,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
|
|||
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
|
||||
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
|
||||
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
|
||||
def test t5 t5 const12 const12 254 0 0 Y 0 0 8
|
||||
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
|
||||
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
|
||||
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
|
||||
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
|
||||
|
|
@ -4723,7 +4723,7 @@ t5 CREATE TABLE `t5` (
|
|||
`param10` bigint(20) default NULL,
|
||||
`const11` int(4) default NULL,
|
||||
`param11` bigint(20) default NULL,
|
||||
`const12` char(0) default NULL,
|
||||
`const12` binary(0) default NULL,
|
||||
`param12` bigint(20) default NULL,
|
||||
`param13` double default NULL,
|
||||
`param14` longtext,
|
||||
|
|
@ -4753,7 +4753,7 @@ def test t5 t5 const10 const10 3 10 9 N 32769 0 63
|
|||
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
|
||||
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
|
||||
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
|
||||
def test t5 t5 const12 const12 254 0 0 Y 0 0 8
|
||||
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
|
||||
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
|
||||
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
|
||||
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue