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
79a184fe
Commit
79a184fe
authored
Dec 15, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved links initialization
parent
5e454f6d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
3 deletions
+28
-3
mysql-test/r/delete.result
mysql-test/r/delete.result
+9
-0
mysql-test/t/delete.test
mysql-test/t/delete.test
+10
-0
sql/sql_lex.cc
sql/sql_lex.cc
+2
-2
sql/sql_lex.h
sql/sql_lex.h
+2
-0
sql/sql_parse.cc
sql/sql_parse.cc
+5
-1
No files found.
mysql-test/r/delete.result
View file @
79a184fe
...
...
@@ -24,3 +24,12 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
delete from t1 where a=27;
drop table t1;
drop table if exists t;
CREATE TABLE `t` (
`i` int(10) NOT NULL default '0',
`i2` int(10) NOT NULL default '0',
PRIMARY KEY (`i`)
) TYPE=MyISAM CHARSET=latin1;
DELETE FROM t USING t WHERE post='1';
Unknown column 'post' in 'where clause'
drop table if exists t;
mysql-test/t/delete.test
View file @
79a184fe
...
...
@@ -35,3 +35,13 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
insert
into
t1
values
(
2
),(
4
),(
6
),(
8
),(
10
),(
12
),(
14
),(
16
),(
18
),(
20
),(
22
),(
24
),(
26
),(
23
),(
27
);
delete
from
t1
where
a
=
27
;
drop
table
t1
;
drop
table
if
exists
t
;
CREATE
TABLE
`t`
(
`i`
int
(
10
)
NOT
NULL
default
'0'
,
`i2`
int
(
10
)
NOT
NULL
default
'0'
,
PRIMARY
KEY
(
`i`
)
)
TYPE
=
MyISAM
CHARSET
=
latin1
;
--
error
1054
DELETE
FROM
t
USING
t
WHERE
post
=
'1'
;
drop
table
if
exists
t
;
\ No newline at end of file
sql/sql_lex.cc
View file @
79a184fe
...
...
@@ -941,8 +941,6 @@ int yylex(void *arg, void *yythd)
void
st_select_lex_node
::
init_query
()
{
next
=
master
=
slave
=
link_next
=
0
;
prev
=
link_prev
=
0
;
dependent
=
0
;
}
...
...
@@ -1011,6 +1009,7 @@ void st_select_lex_node::include_down(st_select_lex_node *upper)
prev
=
&
upper
->
slave
;
upper
->
slave
=
this
;
master
=
upper
;
slave
=
0
;
}
/* include neighbour (on same level) */
...
...
@@ -1021,6 +1020,7 @@ void st_select_lex_node::include_neighbour(st_select_lex_node *before)
prev
=
&
before
->
next
;
before
->
next
=
this
;
master
=
before
->
master
;
slave
=
0
;
}
/* including in global SELECT_LEX list */
...
...
sql/sql_lex.h
View file @
79a184fe
...
...
@@ -194,6 +194,7 @@ enum olap_type
Base class for st_select_lex (SELECT_LEX) &
st_select_lex_unit (SELECT_LEX_UNIT)
*/
struct
st_lex
;
class
st_select_lex
;
class
st_select_lex_unit
;
class
st_select_lex_node
{
...
...
@@ -252,6 +253,7 @@ public:
void
mark_as_dependent
(
st_select_lex
*
last
);
friend
class
st_select_lex_unit
;
friend
bool
mysql_new_select
(
struct
st_lex
*
lex
,
bool
move_down
);
private:
void
fast_exclude
();
};
...
...
sql/sql_parse.cc
View file @
79a184fe
...
...
@@ -2991,11 +2991,13 @@ mysql_init_query(THD *thd)
lex
->
select_lex
.
init_query
();
lex
->
value_list
.
empty
();
lex
->
param_list
.
empty
();
lex
->
unit
.
next
=
lex
->
unit
.
master
=
lex
->
unit
.
link_next
=
0
;
lex
->
unit
.
prev
=
lex
->
unit
.
link_prev
=
0
;
lex
->
unit
.
global_parameters
=
lex
->
unit
.
slave
=
lex
->
current_select
=
lex
->
all_selects_list
=
&
lex
->
select_lex
;
lex
->
select_lex
.
master
=
&
lex
->
unit
;
lex
->
select_lex
.
prev
=
&
lex
->
unit
.
slave
;
lex
->
select_lex
.
link_next
=
0
;
lex
->
select_lex
.
link_next
=
lex
->
select_lex
.
slave
=
lex
->
select_lex
.
next
=
0
;
lex
->
select_lex
.
link_prev
=
(
st_select_lex_node
**
)
&
(
lex
->
all_selects_list
);
lex
->
olap
=
lex
->
describe
=
0
;
lex
->
derived_tables
=
false
;
...
...
@@ -3045,6 +3047,8 @@ mysql_new_select(LEX *lex, bool move_down)
unit
->
init_query
();
unit
->
init_select
();
unit
->
include_down
(
lex
->
current_select
);
unit
->
link_next
=
0
;
unit
->
link_prev
=
0
;
select_lex
->
include_down
(
unit
);
}
else
...
...
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