Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
db2ce1ed
Commit
db2ce1ed
authored
May 26, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed problem with long string results of expressions in UNIONS (BUG#10025)
parent
2536b593
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
mysql-test/r/union.result
mysql-test/r/union.result
+14
-0
mysql-test/t/union.test
mysql-test/t/union.test
+11
-0
sql/item.cc
sql/item.cc
+2
-2
No files found.
mysql-test/r/union.result
View file @
db2ce1ed
...
...
@@ -1235,3 +1235,17 @@ show columns from t2;
Field Type Null Key Default Extra
a varchar(3) YES NULL
drop table t2, t1;
CREATE TABLE t1 (a mediumtext);
CREATE TABLE t2 (b varchar(20));
INSERT INTO t1 VALUES ('a'),('b');
SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
left(a,100000000)
a
b
create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`left(a,100000000)` longtext
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop tables t1,t2,t3;
mysql-test/t/union.test
View file @
db2ce1ed
...
...
@@ -742,3 +742,14 @@ create table t2 select a from t1 union select c from t1;
create
table
t2
select
a
from
t1
union
select
b
from
t1
;
show
columns
from
t2
;
drop
table
t2
,
t1
;
#
# correct conversion long string to TEXT (BUG#10025)
#
CREATE
TABLE
t1
(
a
mediumtext
);
CREATE
TABLE
t2
(
b
varchar
(
20
));
INSERT
INTO
t1
VALUES
(
'a'
),(
'b'
);
SELECT
left
(
a
,
100000000
)
FROM
t1
UNION
SELECT
b
FROM
t2
;
create
table
t3
SELECT
left
(
a
,
100000000
)
FROM
t1
UNION
SELECT
b
FROM
t2
;
show
create
table
t3
;
drop
tables
t1
,
t2
,
t3
;
sql/item.cc
View file @
db2ce1ed
...
...
@@ -3099,8 +3099,8 @@ Field *Item_type_holder::make_field_by_type(TABLE *table)
enum_set_typelib
,
collation
.
collation
);
case
MYSQL_TYPE_VAR_STRING
:
table
->
db_create_options
|=
HA_OPTION_PACK_RECORD
;
return
new
Field_string
(
max_length
,
maybe_null
,
name
,
table
,
collation
.
collation
)
;
fld_type
=
MYSQL_TYPE_STRING
;
break
;
default:
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment