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
8be6dd7d
Commit
8be6dd7d
authored
Jul 28, 2004
by
jan@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge jlindstrom@build.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/mysql-4.1
parents
674bbf08
9e311148
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
91 additions
and
8 deletions
+91
-8
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
innobase/include/srv0srv.h
innobase/include/srv0srv.h
+1
-0
innobase/row/row0sel.c
innobase/row/row0sel.c
+76
-7
innobase/srv/srv0srv.c
innobase/srv/srv0srv.c
+4
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+2
-0
sql/ha_innodb.h
sql/ha_innodb.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+5
-0
sql/set_var.cc
sql/set_var.cc
+1
-0
No files found.
BitKeeper/etc/logging_ok
View file @
8be6dd7d
...
...
@@ -61,6 +61,7 @@ hf@genie.(none)
igor@hundin.mysql.fi
igor@rurik.mysql.com
ingo@mysql.com
jan@hundin.mysql.fi
jani@a80-186-24-72.elisa-laajakaista.fi
jani@dsl-jkl1657.dial.inet.fi
jani@dsl-kpogw4gb5.dial.inet.fi
...
...
innobase/include/srv0srv.h
View file @
8be6dd7d
...
...
@@ -42,6 +42,7 @@ extern char* srv_arch_dir;
#endif
/* UNIV_LOG_ARCHIVE */
extern
ibool
srv_file_per_table
;
extern
ibool
srv_locks_unsafe_for_binlog
;
extern
ulint
srv_n_data_files
;
extern
char
**
srv_data_file_names
;
...
...
innobase/row/row0sel.c
View file @
8be6dd7d
...
...
@@ -631,10 +631,24 @@ row_sel_get_clust_rec(
if
(
!
node
->
read_view
)
{
/* Try to place a lock on the index record */
/* If innodb_locks_unsafe_for_binlog option is used,
we lock only the record, i.e. next-key locking is
not used.
*/
if
(
srv_locks_unsafe_for_binlog
)
{
err
=
lock_clust_rec_read_check_and_lock
(
0
,
clust_rec
,
index
,
node
->
row_lock_mode
,
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
err
=
lock_clust_rec_read_check_and_lock
(
0
,
clust_rec
,
index
,
node
->
row_lock_mode
,
LOCK_ORDINARY
,
thr
);
if
(
err
!=
DB_SUCCESS
)
{
}
if
(
err
!=
DB_SUCCESS
)
{
return
(
err
);
}
...
...
@@ -1184,9 +1198,23 @@ rec_loop:
search result set, resulting in the phantom problem. */
if
(
!
consistent_read
)
{
/* If innodb_locks_unsafe_for_binlog option is used,
we lock only the record, i.e. next-key locking is
not used.
*/
if
(
srv_locks_unsafe_for_binlog
)
{
err
=
sel_set_rec_lock
(
page_rec_get_next
(
rec
),
index
,
node
->
row_lock_mode
,
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
err
=
sel_set_rec_lock
(
page_rec_get_next
(
rec
),
index
,
node
->
row_lock_mode
,
LOCK_ORDINARY
,
thr
);
if
(
err
!=
DB_SUCCESS
)
{
}
if
(
err
!=
DB_SUCCESS
)
{
/* Note that in this case we will store in pcur
the PREDECESSOR of the record we are waiting
the lock for */
...
...
@@ -1211,8 +1239,22 @@ rec_loop:
if
(
!
consistent_read
)
{
/* Try to place a lock on the index record */
err
=
sel_set_rec_lock
(
rec
,
index
,
node
->
row_lock_mode
,
/* If innodb_locks_unsafe_for_binlog option is used,
we lock only the record, i.e. next-key locking is
not used.
*/
if
(
srv_locks_unsafe_for_binlog
)
{
err
=
sel_set_rec_lock
(
rec
,
index
,
node
->
row_lock_mode
,
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
err
=
sel_set_rec_lock
(
rec
,
index
,
node
->
row_lock_mode
,
LOCK_ORDINARY
,
thr
);
}
if
(
err
!=
DB_SUCCESS
)
{
goto
lock_wait_or_error
;
...
...
@@ -3144,10 +3186,24 @@ rec_loop:
/* Try to place a lock on the index record */
err
=
sel_set_rec_lock
(
rec
,
index
,
/* If innodb_locks_unsafe_for_binlog option is used,
we lock only the record, i.e. next-key locking is
not used.
*/
if
(
srv_locks_unsafe_for_binlog
)
{
err
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
err
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
LOCK_ORDINARY
,
thr
);
if
(
err
!=
DB_SUCCESS
)
{
}
if
(
err
!=
DB_SUCCESS
)
{
goto
lock_wait_or_error
;
}
...
...
@@ -3300,9 +3356,22 @@ rec_loop:
prebuilt
->
select_lock_type
,
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
err
=
sel_set_rec_lock
(
rec
,
index
,
/* If innodb_locks_unsafe_for_binlog option is used,
we lock only the record, i.e. next-key locking is
not used.
*/
if
(
srv_locks_unsafe_for_binlog
)
{
err
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
err
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
LOCK_ORDINARY
,
thr
);
}
}
if
(
err
!=
DB_SUCCESS
)
{
...
...
innobase/srv/srv0srv.c
View file @
8be6dd7d
...
...
@@ -77,6 +77,10 @@ ibool srv_file_per_table = FALSE; /* store to its own file each table
created by an user; data dictionary
tables are in the system tablespace
0 */
ibool
srv_locks_unsafe_for_binlog
=
FALSE
;
/* Place locks to records only
i.e. do not use next-key locking
except on duplicate key checking and
foreign key checking */
ulint
srv_n_data_files
=
0
;
char
**
srv_data_file_names
=
NULL
;
ulint
*
srv_data_file_sizes
=
NULL
;
/* size in database pages */
...
...
sql/ha_innodb.cc
View file @
8be6dd7d
...
...
@@ -117,6 +117,7 @@ my_bool innobase_log_archive = FALSE;/* unused */
my_bool
innobase_use_native_aio
=
FALSE
;
my_bool
innobase_fast_shutdown
=
TRUE
;
my_bool
innobase_file_per_table
=
FALSE
;
my_bool
innobase_locks_unsafe_for_binlog
=
FALSE
;
static
char
*
internal_innobase_data_file_path
=
NULL
;
...
...
@@ -908,6 +909,7 @@ innobase_init(void)
srv_fast_shutdown
=
(
ibool
)
innobase_fast_shutdown
;
srv_file_per_table
=
(
ibool
)
innobase_file_per_table
;
srv_locks_unsafe_for_binlog
=
(
ibool
)
innobase_locks_unsafe_for_binlog
;
srv_max_n_open_files
=
(
ulint
)
innobase_open_files
;
...
...
sql/ha_innodb.h
View file @
8be6dd7d
...
...
@@ -189,7 +189,7 @@ extern char *innobase_unix_file_flush_method;
/* The following variables have to be my_bool for SHOW VARIABLES to work */
extern
my_bool
innobase_log_archive
,
innobase_use_native_aio
,
innobase_fast_shutdown
,
innobase_file_per_table
;
innobase_file_per_table
,
innobase_locks_unsafe_for_binlog
;
extern
"C"
{
extern
ulong
srv_max_buf_pool_modified_pct
;
}
...
...
sql/mysqld.cc
View file @
8be6dd7d
...
...
@@ -3880,6 +3880,7 @@ enum options_mysqld
OPT_INNODB_FLUSH_METHOD
,
OPT_INNODB_FAST_SHUTDOWN
,
OPT_INNODB_FILE_PER_TABLE
,
OPT_CRASH_BINLOG_INNODB
,
OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG
,
OPT_SAFE_SHOW_DB
,
OPT_INNODB_SAFE_BINLOG
,
OPT_INNODB
,
OPT_ISAM
,
OPT_NDBCLUSTER
,
OPT_SKIP_SAFEMALLOC
,
OPT_TEMP_POOL
,
OPT_TX_ISOLATION
,
...
...
@@ -4156,6 +4157,10 @@ Disable with --skip-bdb (will save memory).",
"Stores each InnoDB table to an .ibd file in the database dir."
,
(
gptr
*
)
&
innobase_file_per_table
,
(
gptr
*
)
&
innobase_file_per_table
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"innodb_locks_unsafe_for_binlog"
,
OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG
,
"Force Innodb not to use next-key locking. Instead use only row-level locking"
,
(
gptr
*
)
&
innobase_locks_unsafe_for_binlog
,
(
gptr
*
)
&
innobase_locks_unsafe_for_binlog
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
/* End HAVE_INNOBASE_DB */
{
"init-connect"
,
OPT_INIT_CONNECT
,
"Command(s) that are executed for each new connection"
,
(
gptr
*
)
&
opt_init_connect
,
(
gptr
*
)
&
opt_init_connect
,
0
,
GET_STR_ALLOC
,
...
...
sql/set_var.cc
View file @
8be6dd7d
...
...
@@ -673,6 +673,7 @@ struct show_var_st init_vars[]= {
{
"innodb_fast_shutdown"
,
(
char
*
)
&
innobase_fast_shutdown
,
SHOW_MY_BOOL
},
{
"innodb_file_io_threads"
,
(
char
*
)
&
innobase_file_io_threads
,
SHOW_LONG
},
{
"innodb_file_per_table"
,
(
char
*
)
&
innobase_file_per_table
,
SHOW_MY_BOOL
},
{
"innodb_locks_unsafe_for_binlog"
,
(
char
*
)
&
innobase_locks_unsafe_for_binlog
,
SHOW_MY_BOOL
},
{
"innodb_flush_log_at_trx_commit"
,
(
char
*
)
&
innobase_flush_log_at_trx_commit
,
SHOW_INT
},
{
"innodb_flush_method"
,
(
char
*
)
&
innobase_unix_file_flush_method
,
SHOW_CHAR_PTR
},
{
"innodb_force_recovery"
,
(
char
*
)
&
innobase_force_recovery
,
SHOW_LONG
},
...
...
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