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
19e3c001
Commit
19e3c001
authored
Dec 27, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert "LOCK TABLES ... WHERE ENGINE=INNODB"
parent
25c41ddc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
102 deletions
+6
-102
sql/handler.h
sql/handler.h
+0
-7
sql/lock.cc
sql/lock.cc
+0
-58
sql/mysql_priv.h
sql/mysql_priv.h
+0
-1
sql/sql_lex.h
sql/sql_lex.h
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+2
-23
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-11
No files found.
sql/handler.h
View file @
19e3c001
...
...
@@ -480,13 +480,6 @@ public:
{
return
extra
(
operation
);
}
virtual
int
reset
()
{
return
extra
(
HA_EXTRA_RESET
);
}
virtual
int
external_lock
(
THD
*
thd
,
int
lock_type
)
{
return
0
;
}
/*
This is called to set transactional table lock to a table.
If the handler don't support this, then this function will
return HA_ERR_WRONG_COMMAND and MySQL will give
ER_ILLEGAL_HA error message.
*/
virtual
int
transactional_table_lock
(
THD
*
thd
,
int
lock_type
)
{
return
HA_ERR_WRONG_COMMAND
;}
virtual
void
unlock_row
()
{}
virtual
int
start_stmt
(
THD
*
thd
)
{
return
0
;}
/*
...
...
sql/lock.cc
View file @
19e3c001
...
...
@@ -939,61 +939,3 @@ bool make_global_read_lock_block_commit(THD *thd)
DBUG_RETURN
(
error
);
}
/*
Take transactional table lock for all tables in the list
SYNOPSIS
transactional_lock_tables
thd Thread THD
tables list of tables
counter number of tables in the list
NOTES
RETURN
0 - OK
-1 - error
*/
int
transactional_lock_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
,
uint
counter
)
{
uint
i
;
int
lock_type
,
error
=
0
;
TABLE_LIST
*
table
;
TABLE
**
start
,
**
ptr
;
DBUG_ENTER
(
"transactional_lock_tables"
);
if
(
!
(
ptr
=
start
=
(
TABLE
**
)
sql_alloc
(
sizeof
(
TABLE
*
)
*
counter
)))
return
-
1
;
for
(
table
=
tables
;
table
;
table
=
table
->
next_global
)
{
if
(
!
table
->
placeholder
()
&&
!
table
->
schema_table
)
*
(
ptr
++
)
=
table
->
table
;
}
for
(
i
=
1
;
i
<=
counter
;
i
++
,
start
++
)
{
DBUG_ASSERT
((
*
start
)
->
reginfo
.
lock_type
>=
TL_READ
);
lock_type
=
F_WRLCK
;
/* Lock exclusive */
if
((
*
start
)
->
db_stat
&
HA_READ_ONLY
||
((
*
start
)
->
reginfo
.
lock_type
>=
TL_READ
&&
(
*
start
)
->
reginfo
.
lock_type
<=
TL_READ_NO_INSERT
))
lock_type
=
F_RDLCK
;
if
((
error
=
(
*
start
)
->
file
->
transactional_table_lock
(
thd
,
lock_type
)))
{
print_lock_error
(
error
,
(
*
start
)
->
file
->
table_type
());
DBUG_RETURN
(
-
1
);
}
else
{
(
*
start
)
->
db_stat
&=
~
HA_BLOCK_LOCK
;
(
*
start
)
->
current_lock
=
lock_type
;
}
}
DBUG_RETURN
(
0
);
}
sql/mysql_priv.h
View file @
19e3c001
...
...
@@ -830,7 +830,6 @@ int open_tables(THD *thd, TABLE_LIST *tables, uint *counter);
int
simple_open_n_lock_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
);
bool
open_and_lock_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
);
int
lock_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
,
uint
counter
);
int
transactional_lock_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
,
uint
counter
);
TABLE
*
open_temporary_table
(
THD
*
thd
,
const
char
*
path
,
const
char
*
db
,
const
char
*
table_name
,
bool
link_in_list
);
bool
rm_temporary_table
(
enum
db_type
base
,
char
*
path
);
...
...
sql/sql_lex.h
View file @
19e3c001
...
...
@@ -87,8 +87,8 @@ enum enum_sql_command {
SQLCOM_PREPARE
,
SQLCOM_EXECUTE
,
SQLCOM_DEALLOCATE_PREPARE
,
SQLCOM_CREATE_VIEW
,
SQLCOM_DROP_VIEW
,
SQLCOM_CREATE_TRIGGER
,
SQLCOM_DROP_TRIGGER
,
SQLCOM_LOCK_TABLES_TRANSACTIONAL
,
/* This should be the last !!! */
SQLCOM_END
};
...
...
sql/sql_parse.cc
View file @
19e3c001
...
...
@@ -3252,27 +3252,6 @@ create_error:
thd
->
options
&=
~
(
ulong
)
(
OPTION_TABLE_LOCK
);
thd
->
in_lock_tables
=
0
;
break
;
case
SQLCOM_LOCK_TABLES_TRANSACTIONAL
:
{
uint
counter
=
0
;
if
(
check_db_used
(
thd
,
all_tables
))
goto
error
;
if
(
check_table_access
(
thd
,
LOCK_TABLES_ACL
|
SELECT_ACL
,
all_tables
,
0
))
goto
error
;
thd
->
in_lock_tables
=
1
;
thd
->
options
|=
OPTION_TABLE_LOCK
;
if
(
open_tables
(
thd
,
all_tables
,
&
counter
)
==
0
&&
transactional_lock_tables
(
thd
,
all_tables
,
counter
)
==
0
)
send_ok
(
thd
);
else
thd
->
options
&=
~
(
ulong
)
(
OPTION_TABLE_LOCK
);
thd
->
in_lock_tables
=
0
;
break
;
}
case
SQLCOM_CREATE_DB
:
{
char
*
alias
;
...
...
sql/sql_yacc.yy
View file @
19e3c001
...
...
@@ -7418,7 +7418,7 @@ lock:
{
Lex->sql_command=SQLCOM_LOCK_TABLES;
}
table_lock_list
lock_engine_opt
table_lock_list
{}
;
...
...
@@ -7445,15 +7445,6 @@ lock_option:
| READ_SYM LOCAL_SYM { $$= TL_READ; }
;
lock_engine_opt:
/* empty */
| WHERE
{
Lex->sql_command=SQLCOM_LOCK_TABLES_TRANSACTIONAL;
}
ENGINE_SYM opt_equal storage_engines
;
unlock:
UNLOCK_SYM table_or_tables { Lex->sql_command=SQLCOM_UNLOCK_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