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
5ffab995
Commit
5ffab995
authored
Apr 08, 2011
by
Gleb Shchepa
Browse files
Options
Browse Files
Download
Plain Diff
manual merge 5.1-->5.5 (bug 11829681)
parents
da19291f
c64d72f3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
1 deletion
+26
-1
mysql-test/r/view.result
mysql-test/r/view.result
+9
-0
mysql-test/t/view.test
mysql-test/t/view.test
+12
-0
sql/item.cc
sql/item.cc
+1
-1
sql/item.h
sql/item.h
+4
-0
No files found.
mysql-test/r/view.result
View file @
5ffab995
...
@@ -4012,6 +4012,15 @@ DROP TABLE t1;
...
@@ -4012,6 +4012,15 @@ DROP TABLE t1;
#
#
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
DROP VIEW v1;
DROP VIEW v1;
#
# Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
#
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT s.* FROM t1 s, t1 b HAVING a;
SELECT * FROM v1;
a
DROP VIEW v1;
DROP TABLE t1;
# -----------------------------------------------------------------
# -----------------------------------------------------------------
# -- End of 5.1 tests.
# -- End of 5.1 tests.
# -----------------------------------------------------------------
# -----------------------------------------------------------------
...
...
mysql-test/t/view.test
View file @
5ffab995
...
@@ -3979,6 +3979,18 @@ DROP TABLE t1;
...
@@ -3979,6 +3979,18 @@ DROP TABLE t1;
CREATE
VIEW
v1
AS
SELECT
1
IN
(
1
LIKE
2
,
0
)
AS
f
;
CREATE
VIEW
v1
AS
SELECT
1
IN
(
1
LIKE
2
,
0
)
AS
f
;
DROP
VIEW
v1
;
DROP
VIEW
v1
;
--
echo
#
--
echo
# Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
VIEW
v1
AS
SELECT
s
.*
FROM
t1
s
,
t1
b
HAVING
a
;
SELECT
*
FROM
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
--
echo
# -----------------------------------------------------------------
--
echo
# -----------------------------------------------------------------
--
echo
# -- End of 5.1 tests.
--
echo
# -- End of 5.1 tests.
--
echo
# -----------------------------------------------------------------
--
echo
# -----------------------------------------------------------------
...
...
sql/item.cc
View file @
5ffab995
...
@@ -6479,7 +6479,7 @@ void Item_ref::print(String *str, enum_query_type query_type)
...
@@ -6479,7 +6479,7 @@ void Item_ref::print(String *str, enum_query_type query_type)
{
{
THD
*
thd
=
current_thd
;
THD
*
thd
=
current_thd
;
append_identifier
(
thd
,
str
,
(
*
ref
)
->
real_item
()
->
name
,
append_identifier
(
thd
,
str
,
(
*
ref
)
->
real_item
()
->
name
,
(
*
ref
)
->
real_item
()
->
name_length
);
strlen
((
*
ref
)
->
real_item
()
->
name
)
);
}
}
else
else
(
*
ref
)
->
print
(
str
,
query_type
);
(
*
ref
)
->
print
(
str
,
query_type
);
...
...
sql/item.h
View file @
5ffab995
...
@@ -548,6 +548,10 @@ class Item {
...
@@ -548,6 +548,10 @@ class Item {
*/
*/
Item
*
next
;
Item
*
next
;
uint32
max_length
;
/* Maximum length, in bytes */
uint32
max_length
;
/* Maximum length, in bytes */
/*
TODO: convert name and name_length fields into String to keep them in sync
(see bug #11829681/60295 etc).
*/
uint
name_length
;
/* Length of name */
uint
name_length
;
/* Length of name */
int8
marker
;
int8
marker
;
uint8
decimals
;
uint8
decimals
;
...
...
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