summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-07-22 12:35:15 -0700
committerunknown <jimw@mysql.com>2005-07-22 12:35:15 -0700
commit6fd718dfbbe6f9644e0ade69424517cfcff19d8c (patch)
treef92a75a856119748afdb36ea16fd51f742345470 /mysql-test
parentfb006284d8d4c0f38f28c4b2edcc2bf98b00c767 (diff)
parenta4217760b409a0ab05b32f748da70dce629e4697 (diff)
downloadmariadb-git-6fd718dfbbe6f9644e0ade69424517cfcff19d8c.tar.gz
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean mysql-test/r/create.result: Auto merged mysql-test/r/func_str.result: Auto merged mysql-test/t/func_str.test: Auto merged sql/item_strfunc.cc: Auto merged sql/sql_table.cc: Auto merged mysql-test/t/create.test: Resolve conflict sql/mysql_priv.h: Resolve conflict sql/table.cc: Resolve conflict sql/unireg.cc: Resolve conflict
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result4
-rw-r--r--mysql-test/r/func_str.result15
-rw-r--r--mysql-test/t/create.test4
-rw-r--r--mysql-test/t/func_str.test11
4 files changed, 30 insertions, 4 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index d622127e8f0..eba8dddfe72 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -37,7 +37,7 @@ Note 1051 Unknown table 't1'
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
create table not_existing_database.test (a int);
-Got one of the listed errors
+ERROR 42000: Unknown database 'not_existing_database'
create table `a/a` (a int);
ERROR 42000: Incorrect table name 'a/a'
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int);
@@ -358,7 +358,7 @@ create table t3 like t1;
create table t3 like mysqltest.t3;
ERROR 42S01: Table 't3' already exists
create table non_existing_database.t1 like t1;
-Got one of the listed errors
+ERROR 42000: Unknown database 'non_existing_database'
create table t3 like non_existing_table;
ERROR 42S02: Unknown table 'non_existing_table'
create temporary table t3 like t1;
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 5335f53d382..57942d1fcdf 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -879,3 +879,18 @@ drop table t1;
select hex(29223372036854775809), hex(-29223372036854775809);
hex(29223372036854775809) hex(-29223372036854775809)
FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF
+create table t1 (i int);
+insert into t1 values (1000000000),(1);
+select lpad(i, 7, ' ') as t from t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def t 253 7 7 Y 128 31 63
+t
+1000000
+ 1
+select rpad(i, 7, ' ') as t from t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def t 253 7 7 Y 128 31 63
+t
+1000000
+1
+drop table t1;
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index d870ff368d3..5b334d1d31e 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -39,7 +39,7 @@ drop table if exists t1;
--error 1075
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
--- error 1044,1
+-- error 1049
create table not_existing_database.test (a int);
--error 1103
create table `a/a` (a int);
@@ -305,7 +305,7 @@ select * from t2;
create table t3 like t1;
--error 1050
create table t3 like mysqltest.t3;
---error ER_DBACCESS_DENIED_ERROR,1
+--error 1049
create table non_existing_database.t1 like t1;
--error 1051
create table t3 like non_existing_table;
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index efad2721ae5..b7cf9c8c4a0 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -613,3 +613,14 @@ drop table t1;
# Bug #9854 hex() and out of range handling
#
select hex(29223372036854775809), hex(-29223372036854775809);
+
+#
+# Bug #11311: Incorrect length returned from LPAD() and RPAD()
+#
+create table t1 (i int);
+insert into t1 values (1000000000),(1);
+--enable_metadata
+select lpad(i, 7, ' ') as t from t1;
+select rpad(i, 7, ' ') as t from t1;
+--disable_metadata
+drop table t1;