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
d933b0b4
Commit
d933b0b4
authored
Aug 03, 2007
by
gshchepa/uchum@gleb.loc
Browse files
Options
Browse Files
Download
Plain Diff
Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into gleb.loc:/home/uchum/work/bk/5.1-opt
parents
e9eb6309
176a20f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
0 deletions
+49
-0
mysql-test/r/select.result
mysql-test/r/select.result
+10
-0
mysql-test/t/select.test
mysql-test/t/select.test
+30
-0
sql/share/errmsg.txt
sql/share/errmsg.txt
+2
-0
sql/sql_parse.cc
sql/sql_parse.cc
+5
-0
sql/unireg.h
sql/unireg.h
+2
-0
No files found.
mysql-test/r/select.result
View file @
d933b0b4
...
@@ -3980,4 +3980,14 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -3980,4 +3980,14 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE f1 index inx inx 10 NULL 7 Using where; Using index
1 SIMPLE f1 index inx inx 10 NULL 7 Using where; Using index
1 SIMPLE f2 ref inx inx 5 test.f1.b 1 Using where; Using index
1 SIMPLE f2 ref inx inx 5 test.f1.b 1 Using where; Using index
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT);
INSERT INTO t1 VALUES (1,11), (2,22), (2,22);
EXPLAIN SELECT c1 FROM t1 WHERE (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT COUNT(c2)))))))))))))))))))))))))))))))) > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
31 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
32 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
EXPLAIN SELECT c1 FROM t1 WHERE (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT COUNT(c2))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) > 0;
ERROR HY000: Too high level of nesting for select
DROP TABLE t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/t/select.test
View file @
d933b0b4
...
@@ -3359,4 +3359,34 @@ EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2
...
@@ -3359,4 +3359,34 @@ EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2
WHERE
1
AND
f1
.
b
NOT
IN
(
100
,
2232
,
3343
,
51111
);
WHERE
1
AND
f1
.
b
NOT
IN
(
100
,
2232
,
3343
,
51111
);
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #27352: Incorrect result of nested selects instead of error reporting
#
CREATE
TABLE
t1
(
c1
INT
,
c2
INT
);
INSERT
INTO
t1
VALUES
(
1
,
11
),
(
2
,
22
),
(
2
,
22
);
let
$n
=
31
;
let
$q
=
COUNT
(
c2
);
while
(
$n
)
{
let
$q
=
(
SELECT
$q
);
dec
$n
;
}
--
disable_warnings
eval
EXPLAIN
SELECT
c1
FROM
t1
WHERE
$q
>
0
;
--
enable_warnings
let
$n
=
64
;
let
$q
=
COUNT
(
c2
);
while
(
$n
)
{
let
$q
=
(
SELECT
$q
);
dec
$n
;
}
--
error
ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
eval
EXPLAIN
SELECT
c1
FROM
t1
WHERE
$q
>
0
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
sql/share/errmsg.txt
View file @
d933b0b4
...
@@ -5654,6 +5654,8 @@ ER_NON_INSERTABLE_TABLE
...
@@ -5654,6 +5654,8 @@ ER_NON_INSERTABLE_TABLE
ger "Die Zieltabelle %-.100s von %s ist nicht einfgbar"
ger "Die Zieltabelle %-.100s von %s ist nicht einfgbar"
ER_ADMIN_WRONG_MRG_TABLE
ER_ADMIN_WRONG_MRG_TABLE
eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist"
eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist"
ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
eng "Too high level of nesting for select"
ER_FOREIGN_SERVER_EXISTS
ER_FOREIGN_SERVER_EXISTS
eng "The foreign server, %s, you are trying to create already exists."
eng "The foreign server, %s, you are trying to create already exists."
ER_FOREIGN_SERVER_DOESNT_EXIST
ER_FOREIGN_SERVER_DOESNT_EXIST
...
...
sql/sql_parse.cc
View file @
d933b0b4
...
@@ -5230,6 +5230,11 @@ mysql_new_select(LEX *lex, bool move_down)
...
@@ -5230,6 +5230,11 @@ mysql_new_select(LEX *lex, bool move_down)
select_lex
->
init_query
();
select_lex
->
init_query
();
select_lex
->
init_select
();
select_lex
->
init_select
();
lex
->
nest_level
++
;
lex
->
nest_level
++
;
if
(
lex
->
nest_level
>
(
int
)
MAX_SELECT_NESTING
)
{
my_error
(
ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
,
MYF
(
0
),
MAX_SELECT_NESTING
);
DBUG_RETURN
(
1
);
}
select_lex
->
nest_level
=
lex
->
nest_level
;
select_lex
->
nest_level
=
lex
->
nest_level
;
/*
/*
Don't evaluate this subquery during statement prepare even if
Don't evaluate this subquery during statement prepare even if
...
...
sql/unireg.h
View file @
d933b0b4
...
@@ -85,6 +85,8 @@
...
@@ -85,6 +85,8 @@
#define MAX_FIELDS 4096
/* Limit in the .frm file */
#define MAX_FIELDS 4096
/* Limit in the .frm file */
#define MAX_PARTITIONS 1024
#define MAX_PARTITIONS 1024
#define MAX_SELECT_NESTING (sizeof(nesting_map)*8-1)
#define MAX_SORT_MEMORY (2048*1024-MALLOC_OVERHEAD)
#define MAX_SORT_MEMORY (2048*1024-MALLOC_OVERHEAD)
#define MIN_SORT_MEMORY (32*1024-MALLOC_OVERHEAD)
#define MIN_SORT_MEMORY (32*1024-MALLOC_OVERHEAD)
...
...
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