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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
51a70748
Commit
51a70748
authored
Mar 26, 2013
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4292 fix.
Fixed printing column_get finction.
parent
2b89b0a2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
11 deletions
+144
-11
mysql-test/r/dyncol.result
mysql-test/r/dyncol.result
+81
-10
mysql-test/t/dyncol.test
mysql-test/t/dyncol.test
+57
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+6
-1
No files found.
mysql-test/r/dyncol.result
View file @
51a70748
This diff is collapsed.
Click to expand it.
mysql-test/t/dyncol.test
View file @
51a70748
...
...
@@ -546,3 +546,60 @@ select hex(COLUMN_CREATE(0, COLUMN_GET(@a, 9 AS DECIMAL(19,0))));
select
hex
(
COLUMN_CREATE
(
0
,
COLUMN_GET
(
COLUMN_CREATE
(
0
,
0.0
as
decimal
),
0
as
decimal
)));
select
hex
(
COLUMN_CREATE
(
0
,
0.0
as
decimal
));
--
echo
#
--
echo
# MDEV-4292: parse error when selecting on views using dynamic column
--
echo
#
create
table
t1
(
i
int
,
d
blob
);
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
binary
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
int
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
unsigned
int
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
date
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
time
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
datetime
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
decimal
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
double
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
create
view
v1
as
select
i
,
column_get
(
d
,
1
as
char
)
as
a
from
t1
;
select
*
from
v1
;
show
create
view
v1
;
drop
view
v1
;
drop
table
t1
;
--
echo
#
--
echo
# end of 5.3 tests
--
echo
#
sql/item_strfunc.cc
View file @
51a70748
...
...
@@ -4246,11 +4246,16 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
void
Item_dyncol_get
::
print
(
String
*
str
,
enum_query_type
query_type
)
{
/* see create_func_dyncol_get */
DBUG_ASSERT
(
str
->
length
()
>=
5
);
DBUG_ASSERT
(
strncmp
(
str
->
ptr
()
+
str
->
length
()
-
5
,
"cast("
,
5
)
==
0
);
str
->
length
(
str
->
length
()
-
5
);
// removing "cast("
str
->
append
(
STRING_WITH_LEN
(
"column_get("
));
args
[
0
]
->
print
(
str
,
query_type
);
str
->
append
(
','
);
args
[
1
]
->
print
(
str
,
query_type
);
str
->
append
(
')'
);
/* let the parent cast item add " as <type>)" */
}
...
...
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