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
7483b3cf
Commit
7483b3cf
authored
Jun 24, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parameter of my_yyoverflow made independed from YYSIZE_T (BUG#4204)
parent
e71b6931
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
4 deletions
+64
-4
mysql-test/r/union.result
mysql-test/r/union.result
+28
-0
mysql-test/t/union.test
mysql-test/t/union.test
+32
-0
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
No files found.
mysql-test/r/union.result
View file @
7483b3cf
...
...
@@ -960,3 +960,31 @@ a
a
150
drop table t1;
CREATE TABLE t1 ( ID1 int(10) unsigned NOT NULL DEFAULT '0' , ID2 datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , DATA1 varchar(10) , DATA2 double(5,4) , DATA3 datetime , PRIMARY KEY (ID1,ID2));
CREATE TABLE t2 ( ID int(3) unsigned NOT NULL DEFAULT '0' , DATA1 timestamp DEFAULT '0000-00-00 00:00:00' , PRIMARY KEY (ID));
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1);
ID1 ID2 DATA1 DATA2 DATA3 ID DATA1
drop table t1,t2;
mysql-test/t/union.test
View file @
7483b3cf
...
...
@@ -535,3 +535,35 @@ CREATE TABLE t1 (uid int(1));
INSERT
INTO
t1
SELECT
150
;
SELECT
'a'
UNION
SELECT
uid
FROM
t1
;
drop
table
t1
;
#
# parser stack overflow
#
CREATE
TABLE
t1
(
ID1
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
ID2
datetime
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
,
DATA1
varchar
(
10
)
,
DATA2
double
(
5
,
4
)
,
DATA3
datetime
,
PRIMARY
KEY
(
ID1
,
ID2
));
CREATE
TABLE
t2
(
ID
int
(
3
)
unsigned
NOT
NULL
DEFAULT
'0'
,
DATA1
timestamp
DEFAULT
'0000-00-00 00:00:00'
,
PRIMARY
KEY
(
ID
));
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
)
UNION
(
SELECT
*
FROM
t1
AS
PARTITIONED
,
t2
AS
PARTITIONED_B
WHERE
PARTITIONED_B
.
ID
=
PARTITIONED
.
ID1
);
drop
table
t1
,
t2
;
sql/sql_parse.cc
View file @
7483b3cf
...
...
@@ -3816,10 +3816,10 @@ bool check_stack_overrun(THD *thd,char *buf __attribute__((unused)))
#define MY_YACC_INIT 1000 // Start with big alloc
#define MY_YACC_MAX 32000 // Because of 'short'
bool
my_yyoverflow
(
short
**
yyss
,
YYSTYPE
**
yyvs
,
int
*
yystacksize
)
bool
my_yyoverflow
(
short
**
yyss
,
YYSTYPE
**
yyvs
,
ulong
*
yystacksize
)
{
LEX
*
lex
=
current_lex
;
int
old_info
=
0
;
ulong
old_info
=
0
;
if
((
uint
)
*
yystacksize
>=
MY_YACC_MAX
)
return
1
;
if
(
!
lex
->
yacc_yyvs
)
...
...
sql/sql_yacc.yy
View file @
7483b3cf
...
...
@@ -40,7 +40,7 @@
int yylex(void *yylval, void *yythd);
#define yyoverflow(A,B,C,D,E,F)
if (my_yyoverflow((B),(D),(int*) (F))) { yyerror((char*) (A)); return 2;
}
#define yyoverflow(A,B,C,D,E,F)
{ulong val= *(F); if(my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }
}
#define WARN_DEPRECATED(A,B) \
push_warning_printf(((THD *)yythd), MYSQL_ERROR::WARN_LEVEL_WARN, \
...
...
@@ -90,7 +90,7 @@ inline Item *or_or_concat(THD *thd, Item* A, Item* B)
}
%{
bool my_yyoverflow(short **a, YYSTYPE **b,
int
*yystacksize);
bool my_yyoverflow(short **a, YYSTYPE **b,
ulong
*yystacksize);
%}
%pure_parser /* We have threads */
...
...
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