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
82c83c4b
Commit
82c83c4b
authored
Nov 27, 2002
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/work-crash-4.1
parents
6217be22
1ef80674
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
42 deletions
+31
-42
sql/sql_delete.cc
sql/sql_delete.cc
+1
-1
sql/sql_derived.cc
sql/sql_derived.cc
+0
-15
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/sql_lex.h
sql/sql_lex.h
+2
-0
sql/sql_parse.cc
sql/sql_parse.cc
+24
-22
sql/sql_select.cc
sql/sql_select.cc
+2
-2
sql/sql_update.cc
sql/sql_update.cc
+1
-1
No files found.
sql/sql_delete.cc
View file @
82c83c4b
...
...
@@ -43,7 +43,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
if
((
open_and_lock_tables
(
thd
,
table_list
)))
DBUG_RETURN
(
-
1
);
fix_tables_pointers
(
&
thd
->
lex
.
select_lex
);
fix_tables_pointers
(
thd
->
lex
.
all_selects_list
);
table
=
table_list
->
table
;
table
->
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_NO_LOCK
);
thd
->
proc_info
=
"init"
;
...
...
sql/sql_derived.cc
View file @
82c83c4b
...
...
@@ -50,21 +50,6 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
if
(
res
)
DBUG_RETURN
(
-
1
);
for
(
SELECT_LEX
*
ssl
=
sl
;
ssl
;
ssl
=
ssl
->
next_select_in_list
())
{
TABLE_LIST
*
t_tables
=
(
TABLE_LIST
*
)
ssl
->
table_list
.
first
;
for
(
TABLE_LIST
*
cursor
=
(
TABLE_LIST
*
)
t_tables
;
cursor
;
cursor
=
cursor
->
next
)
{
if
(
cursor
->
derived
)
{
res
=
mysql_derived
(
thd
,
lex
,
(
SELECT_LEX_UNIT
*
)
cursor
->
derived
,
cursor
);
if
(
res
)
DBUG_RETURN
(
res
);
}
}
}
Item
*
item
;
List_iterator
<
Item
>
it
(
sl
->
item_list
);
...
...
sql/sql_insert.cc
View file @
82c83c4b
...
...
@@ -157,7 +157,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
res
=
open_and_lock_tables
(
thd
,
table_list
);
if
(
res
)
DBUG_RETURN
(
-
1
);
fix_tables_pointers
(
&
thd
->
lex
.
select_lex
);
fix_tables_pointers
(
thd
->
lex
.
all_selects_list
);
table
=
table_list
->
table
;
thd
->
proc_info
=
"init"
;
...
...
sql/sql_lex.h
View file @
82c83c4b
...
...
@@ -388,6 +388,8 @@ typedef struct st_lex
SELECT_LEX
select_lex
;
/* first SELECT_LEX */
/* current SELECT_LEX in parsing */
SELECT_LEX_NODE
*
current_select
;
/* list of all SELECT_LEX */
SELECT_LEX
*
all_selects_list
;
uchar
*
ptr
,
*
tok_start
,
*
tok_end
,
*
end_of_query
;
char
*
length
,
*
dec
,
*
change
,
*
name
;
char
*
backup_dir
;
/* For RESTORE/BACKUP */
...
...
sql/sql_parse.cc
View file @
82c83c4b
...
...
@@ -1321,7 +1321,7 @@ mysql_execute_command(THD *thd)
that is not a SHOW command or a select that only access local
variables, but for now this is probably good enough.
*/
if
(
tables
||
lex
->
select_lex
.
next_select_in_list
()
)
if
(
tables
||
&
lex
->
select_lex
!=
lex
->
all_selects_list
)
mysql_reset_errors
(
thd
);
/*
Save old warning count to be able to send to client how many warnings we
...
...
@@ -1358,22 +1358,23 @@ mysql_execute_command(THD *thd)
*/
if
(
lex
->
derived_tables
)
{
for
(
SELECT_LEX
*
sl
=
&
lex
->
select_lex
;
sl
;
sl
=
sl
->
next_select_in_list
())
if
(
sl
->
linkage
!=
DERIVED_TABLE_TYPE
)
for
(
TABLE_LIST
*
cursor
=
sl
->
get_table_list
();
cursor
;
cursor
=
cursor
->
next
)
if
(
cursor
->
derived
&&
(
res
=
mysql_derived
(
thd
,
lex
,
(
SELECT_LEX_UNIT
*
)
cursor
->
derived
,
cursor
)))
{
if
(
res
<
0
||
thd
->
net
.
report_error
)
send_error
(
thd
,
thd
->
killed
?
ER_SERVER_SHUTDOWN
:
0
);
DBUG_VOID_RETURN
;
}
}
if
((
lex
->
select_lex
.
next_select_in_list
()
&&
for
(
SELECT_LEX
*
sl
=
lex
->
all_selects_list
;
sl
;
sl
=
sl
->
next_select_in_list
())
for
(
TABLE_LIST
*
cursor
=
sl
->
get_table_list
();
cursor
;
cursor
=
cursor
->
next
)
if
(
cursor
->
derived
&&
(
res
=
mysql_derived
(
thd
,
lex
,
(
SELECT_LEX_UNIT
*
)
cursor
->
derived
,
cursor
)))
{
if
(
res
<
0
||
thd
->
net
.
report_error
)
send_error
(
thd
,
thd
->
killed
?
ER_SERVER_SHUTDOWN
:
0
);
DBUG_VOID_RETURN
;
}
}
if
((
&
lex
->
select_lex
!=
lex
->
all_selects_list
&&
lex
->
unit
.
create_total_list
(
thd
,
lex
,
&
tables
))
||
(
table_rules_on
&&
tables
&&
thd
->
slave_thread
&&
!
tables_ok
(
thd
,
tables
)))
...
...
@@ -1420,7 +1421,7 @@ mysql_execute_command(THD *thd)
}
else
thd
->
send_explain_fields
(
result
);
fix_tables_pointers
(
select_lex
);
fix_tables_pointers
(
lex
->
all_selects_list
);
res
=
mysql_explain_union
(
thd
,
&
thd
->
lex
.
unit
,
result
);
MYSQL_LOCK
*
save_lock
=
thd
->
lock
;
thd
->
lock
=
(
MYSQL_LOCK
*
)
0
;
...
...
@@ -2100,7 +2101,7 @@ mysql_execute_command(THD *thd)
/* Fix tables-to-be-deleted-from list to point at opened tables */
for
(
auxi
=
(
TABLE_LIST
*
)
aux_tables
;
auxi
;
auxi
=
auxi
->
next
)
auxi
->
table
=
auxi
->
table_list
->
table
;
fix_tables_pointers
(
&
lex
->
select_lex
);
fix_tables_pointers
(
lex
->
all_selects_list
);
if
(
!
thd
->
fatal_error
&&
(
result
=
new
multi_delete
(
thd
,
aux_tables
,
table_count
)))
{
...
...
@@ -2848,9 +2849,11 @@ mysql_init_query(THD *thd)
lex
->
value_list
.
empty
();
lex
->
param_list
.
empty
();
lex
->
unit
.
global_parameters
=
lex
->
unit
.
slave
=
lex
->
current_select
=
&
lex
->
select_lex
;
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_prev
=
(
st_select_lex_node
**
)
&
(
lex
->
all_selects_list
);
lex
->
olap
=
lex
->
describe
=
0
;
lex
->
derived_tables
=
false
;
thd
->
check_loops_counter
=
thd
->
select_number
=
...
...
@@ -2903,8 +2906,7 @@ mysql_new_select(LEX *lex, bool move_down)
select_lex
->
master_unit
()
->
global_parameters
=
select_lex
;
DBUG_ASSERT
(
lex
->
current_select
->
linkage
!=
GLOBAL_OPTIONS_TYPE
);
select_lex
->
include_global
(
lex
->
current_select
->
select_lex
()
->
next_select_in_list_addr
());
select_lex
->
include_global
((
st_select_lex_node
**
)
&
lex
->
all_selects_list
);
lex
->
current_select
=
select_lex
;
return
0
;
}
...
...
sql/sql_select.cc
View file @
82c83c4b
...
...
@@ -158,7 +158,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
{
int
res
;
register
SELECT_LEX
*
select_lex
=
&
lex
->
select_lex
;
fix_tables_pointers
(
select_lex
);
fix_tables_pointers
(
lex
->
all_selects_list
);
if
(
select_lex
->
next_select
())
res
=
mysql_union
(
thd
,
lex
,
result
);
else
...
...
@@ -7514,7 +7514,7 @@ int mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
{
res
=
mysql_explain_select
(
thd
,
sl
,
(((
&
thd
->
lex
.
select_lex
)
==
sl
)
?
((
sl
->
next_select_in_list
()
)
?
"PRIMARY"
:
((
thd
->
lex
.
all_selects_list
!=
sl
)
?
"PRIMARY"
:
"SIMPLE"
)
:
((
sl
==
first
)
?
((
sl
->
linkage
==
DERIVED_TABLE_TYPE
)
?
...
...
sql/sql_update.cc
View file @
82c83c4b
...
...
@@ -70,7 +70,7 @@ int mysql_update(THD *thd,
if
((
open_and_lock_tables
(
thd
,
table_list
)))
DBUG_RETURN
(
-
1
);
fix_tables_pointers
(
&
thd
->
lex
.
select_lex
);
fix_tables_pointers
(
thd
->
lex
.
all_selects_list
);
table
=
table_list
->
table
;
save_time_stamp
=
table
->
time_stamp
;
...
...
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