expr repeat/space/lrpad opt for text type
This commit is contained in:
@ -82,3 +82,17 @@ select repeat(1.414, 2);
|
||||
select repeat("abc", 200000000);
|
||||
ERROR HY000: Result of repeat() was larger than max_allowed_packet (4194304) - truncated
|
||||
|
||||
drop table t2;
|
||||
create table t2 as select repeat('a', 512),repeat('a', 513),repeat('a',32767),repeat('a',32768),repeat('a',65535),repeat('a',65536) from dual;
|
||||
desc t2;
|
||||
+-------------------+--------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-------------------+--------------+------+-----+---------+-------+
|
||||
| repeat('a', 512) | varchar(512) | YES | | NULL | |
|
||||
| repeat('a', 513) | text | YES | | NULL | |
|
||||
| repeat('a',32767) | text | YES | | NULL | |
|
||||
| repeat('a',32768) | text | YES | | NULL | |
|
||||
| repeat('a',65535) | text | YES | | NULL | |
|
||||
| repeat('a',65536) | longtext | YES | | NULL | |
|
||||
+-------------------+--------------+------+-----+---------+-------+
|
||||
drop table t2;
|
||||
|
||||
@ -33,6 +33,12 @@ select repeat(1.414, 2);
|
||||
--error 1301
|
||||
select repeat("abc", 200000000);
|
||||
|
||||
--error 0,1051
|
||||
drop table t2;
|
||||
create table t2 as select repeat('a', 512),repeat('a', 513),repeat('a',32767),repeat('a',32768),repeat('a',65535),repeat('a',65536) from dual;
|
||||
desc t2;
|
||||
drop table t2;
|
||||
|
||||
--enable_warnings
|
||||
|
||||
connection syscon;
|
||||
|
||||
Reference in New Issue
Block a user