diff options
author | unknown <bar@mysql.com> | 2004-11-05 13:37:36 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-11-05 13:37:36 +0400 |
commit | aee1e78aa1e0be37acd9640dfb48f63200a7d0ef (patch) | |
tree | 2dc75c5933d9dbd60558ce6c8f7a9fbaf9e0499d | |
parent | d497334164505a4e380bbf4170966379c11d95a8 (diff) | |
download | mariadb-git-aee1e78aa1e0be37acd9640dfb48f63200a7d0ef.tar.gz |
As it is wrong and confusing to associate any
character set with NULL, @a should be latin2
after this query sequence:
SET @a=_latin2'string';
SET @a=NULL;
I.e. the second query should not change the charset
to the current default value, but should keep the
original value assigned during the first query.
In order to do it, we don't copy charset
from the argument if the argument is NULL
and the variable has previously been initialized.
mysql-test/r/ps_6bdb.result:
t
mysql-test/r/ps_5merge.result:
t
mysql-test/r/ps_3innodb.result:
t
mysql-test/r/ps_7ndb.result:
t
mysql-test/r/ps_4heap.result:
t
mysql-test/r/ps_2myisam.result:
t
sql/item_func.cc:
t
-rw-r--r-- | mysql-test/r/ps_2myisam.result | 76 | ||||
-rw-r--r-- | mysql-test/r/ps_3innodb.result | 76 | ||||
-rw-r--r-- | mysql-test/r/ps_4heap.result | 108 | ||||
-rw-r--r-- | mysql-test/r/ps_5merge.result | 152 | ||||
-rw-r--r-- | mysql-test/r/ps_6bdb.result | 76 | ||||
-rw-r--r-- | mysql-test/r/ps_7ndb.result | 108 | ||||
-rw-r--r-- | sql/item_func.cc | 21 |
7 files changed, 317 insertions, 300 deletions
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index efb12561950..345929d8104 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1793,7 +1793,7 @@ t5 CREATE TABLE `t5` ( `const12` char(0) default NULL, `param12` bigint(20) default NULL, `param13` double default NULL, - `param14` longblob, + `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t5 ; @@ -1823,7 +1823,7 @@ 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 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 144 0 63 +def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 @@ -1976,19 +1976,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -2066,19 +2066,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2158,19 +2158,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2242,19 +2242,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index cb096882d13..45a3af8e6fa 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1776,7 +1776,7 @@ t5 CREATE TABLE `t5` ( `const12` char(0) default NULL, `param12` bigint(20) default NULL, `param13` double default NULL, - `param14` longblob, + `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t5 ; @@ -1806,7 +1806,7 @@ 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 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 144 0 63 +def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 @@ -1959,19 +1959,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -2049,19 +2049,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2141,19 +2141,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2225,19 +2225,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index ac9946ef070..995224fcd21 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1777,7 +1777,7 @@ t5 CREATE TABLE `t5` ( `const12` char(0) default NULL, `param12` bigint(20) default NULL, `param13` double default NULL, - `param14` longblob, + `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t5 ; @@ -1807,7 +1807,7 @@ 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 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 144 0 63 +def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 @@ -1960,19 +1960,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 +def @arg23 254 8192 0 Y 0 31 8 +def @arg24 254 8192 0 Y 0 31 8 +def @arg25 254 8192 0 Y 0 31 8 +def @arg26 254 8192 0 Y 0 31 8 +def @arg27 254 8192 0 Y 0 31 8 +def @arg28 254 8192 0 Y 0 31 8 +def @arg29 254 8192 0 Y 0 31 8 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -2050,19 +2050,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 +def @arg23 254 8192 0 Y 0 31 8 +def @arg24 254 8192 0 Y 0 31 8 +def @arg25 254 8192 0 Y 0 31 8 +def @arg26 254 8192 0 Y 0 31 8 +def @arg27 254 8192 0 Y 0 31 8 +def @arg28 254 8192 0 Y 0 31 8 +def @arg29 254 8192 0 Y 0 31 8 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2142,19 +2142,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 +def @arg23 254 8192 0 Y 0 31 8 +def @arg24 254 8192 0 Y 0 31 8 +def @arg25 254 8192 0 Y 0 31 8 +def @arg26 254 8192 0 Y 0 31 8 +def @arg27 254 8192 0 Y 0 31 8 +def @arg28 254 8192 0 Y 0 31 8 +def @arg29 254 8192 0 Y 0 31 8 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2226,19 +2226,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 +def @arg23 254 8192 0 Y 0 31 8 +def @arg24 254 8192 0 Y 0 31 8 +def @arg25 254 8192 0 Y 0 31 8 +def @arg26 254 8192 0 Y 0 31 8 +def @arg27 254 8192 0 Y 0 31 8 +def @arg28 254 8192 0 Y 0 31 8 +def @arg29 254 8192 0 Y 0 31 8 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 15e707959ca..7a0191b186a 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1716,7 +1716,7 @@ t5 CREATE TABLE `t5` ( `const12` char(0) default NULL, `param12` bigint(20) default NULL, `param13` double default NULL, - `param14` longblob, + `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t5 ; @@ -1746,7 +1746,7 @@ 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 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 144 0 63 +def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 @@ -1899,19 +1899,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -1989,19 +1989,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2081,19 +2081,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2165,19 +2165,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -4726,7 +4726,7 @@ t5 CREATE TABLE `t5` ( `const12` char(0) default NULL, `param12` bigint(20) default NULL, `param13` double default NULL, - `param14` longblob, + `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t5 ; @@ -4756,7 +4756,7 @@ 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 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 144 0 63 +def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 @@ -4909,19 +4909,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -4999,19 +4999,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -5091,19 +5091,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -5175,19 +5175,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index 3dd9c200510..d0549503bfe 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -1776,7 +1776,7 @@ t5 CREATE TABLE `t5` ( `const12` char(0) default NULL, `param12` bigint(20) default NULL, `param13` double default NULL, - `param14` longblob, + `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t5 ; @@ -1806,7 +1806,7 @@ 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 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 144 0 63 +def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 @@ -1959,19 +1959,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -2049,19 +2049,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2141,19 +2141,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2225,19 +2225,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 +def @arg24 254 8192 0 Y 0 31 8 def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 +def @arg26 254 8192 0 Y 0 31 8 def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 +def @arg28 254 8192 0 Y 0 31 8 def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 85e51df776f..e90eff5d1cd 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -1752,7 +1752,7 @@ t5 CREATE TABLE `t5` ( `const12` char(0) default NULL, `param12` bigint(20) default NULL, `param13` double default NULL, - `param14` longblob, + `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t5 ; @@ -1782,7 +1782,7 @@ 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 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 144 0 63 +def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 @@ -1935,19 +1935,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 +def @arg23 254 8192 0 Y 0 31 8 +def @arg24 254 8192 0 Y 0 31 8 +def @arg25 254 8192 0 Y 0 31 8 +def @arg26 254 8192 0 Y 0 31 8 +def @arg27 254 8192 0 Y 0 31 8 +def @arg28 254 8192 0 Y 0 31 8 +def @arg29 254 8192 0 Y 0 31 8 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -2025,19 +2025,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 +def @arg23 254 8192 0 Y 0 31 8 +def @arg24 254 8192 0 Y 0 31 8 +def @arg25 254 8192 0 Y 0 31 8 +def @arg26 254 8192 0 Y 0 31 8 +def @arg27 254 8192 0 Y 0 31 8 +def @arg28 254 8192 0 Y 0 31 8 +def @arg29 254 8192 0 Y 0 31 8 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2117,19 +2117,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 +def @arg23 254 8192 0 Y 0 31 8 +def @arg24 254 8192 0 Y 0 31 8 +def @arg25 254 8192 0 Y 0 31 8 +def @arg26 254 8192 0 Y 0 31 8 +def @arg27 254 8192 0 Y 0 31 8 +def @arg28 254 8192 0 Y 0 31 8 +def @arg29 254 8192 0 Y 0 31 8 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2201,19 +2201,19 @@ def @arg16 254 8192 0 Y 128 31 63 def @arg17 254 20 0 Y 128 31 63 def @arg18 254 20 0 Y 128 31 63 def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 128 31 63 -def @arg21 254 8192 0 Y 128 31 63 -def @arg22 254 8192 0 Y 128 31 63 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 128 31 63 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 128 31 63 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 128 31 63 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 128 31 63 -def @arg31 254 8192 0 Y 128 31 63 -def @arg32 254 8192 0 Y 128 31 63 +def @arg20 254 8192 0 Y 0 31 8 +def @arg21 254 8192 0 Y 0 31 8 +def @arg22 254 8192 0 Y 0 31 8 +def @arg23 254 8192 0 Y 0 31 8 +def @arg24 254 8192 0 Y 0 31 8 +def @arg25 254 8192 0 Y 0 31 8 +def @arg26 254 8192 0 Y 0 31 8 +def @arg27 254 8192 0 Y 0 31 8 +def @arg28 254 8192 0 Y 0 31 8 +def @arg29 254 8192 0 Y 0 31 8 +def @arg30 254 8192 0 Y 0 31 8 +def @arg31 254 8192 0 Y 0 31 8 +def @arg32 254 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; diff --git a/sql/item_func.cc b/sql/item_func.cc index 09d7e50eaa3..b382dbf7bf9 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2340,6 +2340,7 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name, entry->value=0; entry->length=0; entry->update_query_id=0; + entry->collation.set(NULL, DERIVATION_NONE); /* If we are here, we were called from a SET or a query which sets a variable. Imagine it is this: @@ -2381,7 +2382,24 @@ bool Item_func_set_user_var::fix_fields(THD *thd, TABLE_LIST *tables, is different from query_id). */ entry->update_query_id= thd->query_id; - entry->collation.set(args[0]->collation); + /* + As it is wrong and confusing to associate any + character set with NULL, @a should be latin2 + after this query sequence: + + SET @a=_latin2'string'; + SET @a=NULL; + + I.e. the second query should not change the charset + to the current default value, but should keep the + original value assigned during the first query. + In order to do it, we don't copy charset + from the argument if the argument is NULL + and the variable has previously been initialized. + */ + if (!entry->collation.collation || !args[0]->null_value) + entry->collation.set(args[0]->collation); + collation.set(entry->collation); cached_result_type= args[0]->result_type(); return 0; } @@ -2409,7 +2427,6 @@ bool Item_func_set_user_var::update_hash(void *ptr, uint length, my_free(entry->value,MYF(0)); entry->value=0; entry->length=0; - entry->collation.set(cs, dv); } else { |