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
e89f7666
Commit
e89f7666
authored
May 16, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/work-qc-4.0
parents
f5ed8784
e78a8194
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
16 deletions
+28
-16
sql/sql_delete.cc
sql/sql_delete.cc
+7
-4
sql/sql_insert.cc
sql/sql_insert.cc
+6
-4
sql/sql_parse.cc
sql/sql_parse.cc
+3
-4
sql/sql_table.cc
sql/sql_table.cc
+4
-0
sql/sql_update.cc
sql/sql_update.cc
+8
-4
No files found.
sql/sql_delete.cc
View file @
e89f7666
...
@@ -176,15 +176,15 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
...
@@ -176,15 +176,15 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
}
}
if
(
using_transactions
&&
ha_autocommit_or_rollback
(
thd
,
error
>=
0
))
if
(
using_transactions
&&
ha_autocommit_or_rollback
(
thd
,
error
>=
0
))
error
=
1
;
error
=
1
;
if
(
deleted
)
{
query_cache_invalidate3
(
thd
,
table_list
,
1
);
}
if
(
thd
->
lock
)
if
(
thd
->
lock
)
{
{
mysql_unlock_tables
(
thd
,
thd
->
lock
);
mysql_unlock_tables
(
thd
,
thd
->
lock
);
thd
->
lock
=
0
;
thd
->
lock
=
0
;
}
}
if
(
deleted
)
{
query_cache_invalidate3
(
thd
,
table_list
,
1
);
}
delete
select
;
delete
select
;
if
(
error
>=
0
)
// Fatal error
if
(
error
>=
0
)
// Fatal error
send_error
(
&
thd
->
net
,
thd
->
killed
?
ER_SERVER_SHUTDOWN
:
0
);
send_error
(
&
thd
->
net
,
thd
->
killed
?
ER_SERVER_SHUTDOWN
:
0
);
...
@@ -357,6 +357,9 @@ void multi_delete::send_error(uint errcode,const char *err)
...
@@ -357,6 +357,9 @@ void multi_delete::send_error(uint errcode,const char *err)
if
(
!
deleted
)
if
(
!
deleted
)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
/* Somthing alredy deleted consequently we have to invalidate cache */
query_cache_invalidate3
(
thd
,
delete_tables
,
1
);
/* Below can happen when thread is killed early ... */
/* Below can happen when thread is killed early ... */
if
(
!
table_being_deleted
)
if
(
!
table_being_deleted
)
table_being_deleted
=
delete_tables
;
table_being_deleted
=
delete_tables
;
...
...
sql/sql_insert.cc
View file @
e89f7666
...
@@ -262,6 +262,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
...
@@ -262,6 +262,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
info
.
copied
=
values_list
.
elements
;
info
.
copied
=
values_list
.
elements
;
end_delayed_insert
(
thd
);
end_delayed_insert
(
thd
);
}
}
if
(
info
.
copied
||
info
.
deleted
)
query_cache_invalidate3
(
thd
,
table_list
,
1
);
}
}
else
else
{
{
...
@@ -303,6 +305,10 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
...
@@ -303,6 +305,10 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
}
}
if
(
using_transactions
)
if
(
using_transactions
)
error
=
ha_autocommit_or_rollback
(
thd
,
error
);
error
=
ha_autocommit_or_rollback
(
thd
,
error
);
if
(
info
.
copied
||
info
.
deleted
)
{
query_cache_invalidate3
(
thd
,
table_list
,
1
);
}
if
(
thd
->
lock
)
if
(
thd
->
lock
)
{
{
mysql_unlock_tables
(
thd
,
thd
->
lock
);
mysql_unlock_tables
(
thd
,
thd
->
lock
);
...
@@ -310,10 +316,6 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
...
@@ -310,10 +316,6 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
}
}
}
}
thd
->
proc_info
=
"end"
;
thd
->
proc_info
=
"end"
;
if
(
info
.
copied
||
info
.
deleted
)
{
query_cache_invalidate3
(
thd
,
table_list
,
1
);
}
table
->
time_stamp
=
save_time_stamp
;
// Restore auto timestamp ptr
table
->
time_stamp
=
save_time_stamp
;
// Restore auto timestamp ptr
table
->
next_number_field
=
0
;
table
->
next_number_field
=
0
;
thd
->
count_cuted_fields
=
0
;
thd
->
count_cuted_fields
=
0
;
...
...
sql/sql_parse.cc
View file @
e89f7666
...
@@ -1707,7 +1707,6 @@ mysql_execute_command(void)
...
@@ -1707,7 +1707,6 @@ mysql_execute_command(void)
check_table_access
(
thd
,
SELECT_ACL
|
INSERT_ACL
,
tables
))
check_table_access
(
thd
,
SELECT_ACL
|
INSERT_ACL
,
tables
))
goto
error
;
/* purecov: inspected */
goto
error
;
/* purecov: inspected */
res
=
mysql_repair_table
(
thd
,
tables
,
&
lex
->
check_opt
);
res
=
mysql_repair_table
(
thd
,
tables
,
&
lex
->
check_opt
);
query_cache_invalidate3
(
thd
,
tables
,
0
);
break
;
break
;
}
}
case
SQLCOM_CHECK
:
case
SQLCOM_CHECK
:
...
@@ -1716,7 +1715,6 @@ mysql_execute_command(void)
...
@@ -1716,7 +1715,6 @@ mysql_execute_command(void)
check_table_access
(
thd
,
SELECT_ACL
|
EXTRA_ACL
,
tables
))
check_table_access
(
thd
,
SELECT_ACL
|
EXTRA_ACL
,
tables
))
goto
error
;
/* purecov: inspected */
goto
error
;
/* purecov: inspected */
res
=
mysql_check_table
(
thd
,
tables
,
&
lex
->
check_opt
);
res
=
mysql_check_table
(
thd
,
tables
,
&
lex
->
check_opt
);
query_cache_invalidate3
(
thd
,
tables
,
0
);
break
;
break
;
}
}
case
SQLCOM_ANALYZE
:
case
SQLCOM_ANALYZE
:
...
@@ -1979,8 +1977,9 @@ mysql_execute_command(void)
...
@@ -1979,8 +1977,9 @@ mysql_execute_command(void)
/* Fix tables-to-be-deleted-from list to point at opened tables */
/* Fix tables-to-be-deleted-from list to point at opened tables */
for
(
auxi
=
(
TABLE_LIST
*
)
aux_tables
;
auxi
;
auxi
=
auxi
->
next
)
for
(
auxi
=
(
TABLE_LIST
*
)
aux_tables
;
auxi
;
auxi
=
auxi
->
next
)
auxi
->
table
=
((
TABLE_LIST
*
)
auxi
->
table
)
->
table
;
auxi
->
table
=
((
TABLE_LIST
*
)
auxi
->
table
)
->
table
;
if
(
!
thd
->
fatal_error
&&
(
result
=
new
multi_delete
(
thd
,
aux_tables
,
if
(
!
thd
->
fatal_error
&&
(
result
=
new
multi_delete
(
thd
,
aux_tables
,
lex
->
lock_option
,
table_count
)))
lex
->
lock_option
,
table_count
)))
{
{
res
=
mysql_select
(
thd
,
tables
,
select_lex
->
item_list
,
res
=
mysql_select
(
thd
,
tables
,
select_lex
->
item_list
,
select_lex
->
where
,
select_lex
->
where
,
...
...
sql/sql_table.cc
View file @
e89f7666
...
@@ -1119,8 +1119,12 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
...
@@ -1119,8 +1119,12 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
if
(
fatal_error
)
if
(
fatal_error
)
table
->
table
->
version
=
0
;
// Force close of table
table
->
table
->
version
=
0
;
// Force close of table
else
if
(
open_for_modify
)
else
if
(
open_for_modify
)
{
remove_table_from_cache
(
thd
,
table
->
table
->
table_cache_key
,
remove_table_from_cache
(
thd
,
table
->
table
->
table_cache_key
,
table
->
table
->
real_name
);
table
->
table
->
real_name
);
/* May be something modified consequently we have to invalidate cache */
query_cache_invalidate3
(
thd
,
table
->
table
,
0
);
}
close_thread_tables
(
thd
);
close_thread_tables
(
thd
);
table
->
table
=
0
;
// For query cache
table
->
table
=
0
;
// For query cache
if
(
my_net_write
(
&
thd
->
net
,
(
char
*
)
packet
->
ptr
(),
if
(
my_net_write
(
&
thd
->
net
,
(
char
*
)
packet
->
ptr
(),
...
...
sql/sql_update.cc
View file @
e89f7666
...
@@ -318,15 +318,15 @@ int mysql_update(THD *thd,
...
@@ -318,15 +318,15 @@ int mysql_update(THD *thd,
}
}
if
(
using_transactions
&&
ha_autocommit_or_rollback
(
thd
,
error
>=
0
))
if
(
using_transactions
&&
ha_autocommit_or_rollback
(
thd
,
error
>=
0
))
error
=
1
;
error
=
1
;
if
(
updated
)
{
query_cache_invalidate3
(
thd
,
table_list
,
1
);
}
if
(
thd
->
lock
)
if
(
thd
->
lock
)
{
{
mysql_unlock_tables
(
thd
,
thd
->
lock
);
mysql_unlock_tables
(
thd
,
thd
->
lock
);
thd
->
lock
=
0
;
thd
->
lock
=
0
;
}
}
if
(
updated
)
{
query_cache_invalidate3
(
thd
,
table_list
,
1
);
}
delete
select
;
delete
select
;
if
(
error
>=
0
)
if
(
error
>=
0
)
...
@@ -644,6 +644,10 @@ void multi_update::send_error(uint errcode,const char *err)
...
@@ -644,6 +644,10 @@ void multi_update::send_error(uint errcode,const char *err)
/* If nothing updated return */
/* If nothing updated return */
if
(
!
updated
)
if
(
!
updated
)
return
;
return
;
/* Somthing alredy updated consequently we have to invalidate cache */
query_cache_invalidate3
(
thd
,
update_tables
,
1
);
/* Below can happen when thread is killed early ... */
/* Below can happen when thread is killed early ... */
if
(
!
table_being_updated
)
if
(
!
table_being_updated
)
table_being_updated
=
update_tables
;
table_being_updated
=
update_tables
;
...
...
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