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
3ca686c5
Commit
3ca686c5
authored
Jul 21, 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
84d9b862
0449396a
Changes
8
Show 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 @
3ca686c5
...
@@ -61,6 +61,7 @@ hf@genie.(none)
...
@@ -61,6 +61,7 @@ hf@genie.(none)
igor@hundin.mysql.fi
igor@hundin.mysql.fi
igor@rurik.mysql.com
igor@rurik.mysql.com
ingo@mysql.com
ingo@mysql.com
jan@hundin.mysql.fi
jani@a80-186-24-72.elisa-laajakaista.fi
jani@a80-186-24-72.elisa-laajakaista.fi
jani@dsl-jkl1657.dial.inet.fi
jani@dsl-jkl1657.dial.inet.fi
jani@dsl-kpogw4gb5.dial.inet.fi
jani@dsl-kpogw4gb5.dial.inet.fi
...
...
innobase/include/srv0srv.h
View file @
3ca686c5
...
@@ -42,6 +42,7 @@ extern char* srv_arch_dir;
...
@@ -42,6 +42,7 @@ extern char* srv_arch_dir;
#endif
/* UNIV_LOG_ARCHIVE */
#endif
/* UNIV_LOG_ARCHIVE */
extern
ibool
srv_file_per_table
;
extern
ibool
srv_file_per_table
;
extern
ibool
srv_locks_unsafe_for_binlog
;
extern
ulint
srv_n_data_files
;
extern
ulint
srv_n_data_files
;
extern
char
**
srv_data_file_names
;
extern
char
**
srv_data_file_names
;
...
...
innobase/row/row0sel.c
View file @
3ca686c5
...
@@ -632,8 +632,22 @@ row_sel_get_clust_rec(
...
@@ -632,8 +632,22 @@ row_sel_get_clust_rec(
if
(
!
node
->
read_view
)
{
if
(
!
node
->
read_view
)
{
/* Try to place a lock on the index record */
/* 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
,
err
=
lock_clust_rec_read_check_and_lock
(
0
,
clust_rec
,
index
,
node
->
row_lock_mode
,
LOCK_ORDINARY
,
thr
);
node
->
row_lock_mode
,
LOCK_ORDINARY
,
thr
);
}
if
(
err
!=
DB_SUCCESS
)
{
if
(
err
!=
DB_SUCCESS
)
{
return
(
err
);
return
(
err
);
...
@@ -1184,8 +1198,22 @@ rec_loop:
...
@@ -1184,8 +1198,22 @@ rec_loop:
search result set, resulting in the phantom problem. */
search result set, resulting in the phantom problem. */
if
(
!
consistent_read
)
{
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
,
err
=
sel_set_rec_lock
(
page_rec_get_next
(
rec
),
index
,
node
->
row_lock_mode
,
LOCK_ORDINARY
,
thr
);
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
/* Note that in this case we will store in pcur
the PREDECESSOR of the record we are waiting
the PREDECESSOR of the record we are waiting
...
@@ -1211,8 +1239,22 @@ rec_loop:
...
@@ -1211,8 +1239,22 @@ rec_loop:
if
(
!
consistent_read
)
{
if
(
!
consistent_read
)
{
/* Try to place a lock on the index record */
/* 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
=
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
,
err
=
sel_set_rec_lock
(
rec
,
index
,
node
->
row_lock_mode
,
LOCK_ORDINARY
,
thr
);
LOCK_ORDINARY
,
thr
);
}
if
(
err
!=
DB_SUCCESS
)
{
if
(
err
!=
DB_SUCCESS
)
{
goto
lock_wait_or_error
;
goto
lock_wait_or_error
;
...
@@ -3144,9 +3186,23 @@ rec_loop:
...
@@ -3144,9 +3186,23 @@ rec_loop:
/* Try to place a lock on the index record */
/* 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
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
err
=
sel_set_rec_lock
(
rec
,
index
,
err
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
prebuilt
->
select_lock_type
,
LOCK_ORDINARY
,
thr
);
LOCK_ORDINARY
,
thr
);
}
if
(
err
!=
DB_SUCCESS
)
{
if
(
err
!=
DB_SUCCESS
)
{
goto
lock_wait_or_error
;
goto
lock_wait_or_error
;
...
@@ -3300,10 +3356,23 @@ rec_loop:
...
@@ -3300,10 +3356,23 @@ rec_loop:
prebuilt
->
select_lock_type
,
prebuilt
->
select_lock_type
,
LOCK_REC_NOT_GAP
,
thr
);
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
}
else
{
/* 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
,
err
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
prebuilt
->
select_lock_type
,
LOCK_ORDINARY
,
thr
);
LOCK_ORDINARY
,
thr
);
}
}
}
if
(
err
!=
DB_SUCCESS
)
{
if
(
err
!=
DB_SUCCESS
)
{
...
...
innobase/srv/srv0srv.c
View file @
3ca686c5
...
@@ -77,6 +77,10 @@ ibool srv_file_per_table = FALSE; /* store to its own file each table
...
@@ -77,6 +77,10 @@ ibool srv_file_per_table = FALSE; /* store to its own file each table
created by an user; data dictionary
created by an user; data dictionary
tables are in the system tablespace
tables are in the system tablespace
0 */
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
;
ulint
srv_n_data_files
=
0
;
char
**
srv_data_file_names
=
NULL
;
char
**
srv_data_file_names
=
NULL
;
ulint
*
srv_data_file_sizes
=
NULL
;
/* size in database pages */
ulint
*
srv_data_file_sizes
=
NULL
;
/* size in database pages */
...
...
sql/ha_innodb.cc
View file @
3ca686c5
...
@@ -117,6 +117,7 @@ my_bool innobase_log_archive = FALSE;/* unused */
...
@@ -117,6 +117,7 @@ my_bool innobase_log_archive = FALSE;/* unused */
my_bool
innobase_use_native_aio
=
FALSE
;
my_bool
innobase_use_native_aio
=
FALSE
;
my_bool
innobase_fast_shutdown
=
TRUE
;
my_bool
innobase_fast_shutdown
=
TRUE
;
my_bool
innobase_file_per_table
=
FALSE
;
my_bool
innobase_file_per_table
=
FALSE
;
my_bool
innobase_locks_unsafe_for_binlog
=
FALSE
;
static
char
*
internal_innobase_data_file_path
=
NULL
;
static
char
*
internal_innobase_data_file_path
=
NULL
;
...
@@ -908,6 +909,7 @@ innobase_init(void)
...
@@ -908,6 +909,7 @@ innobase_init(void)
srv_fast_shutdown
=
(
ibool
)
innobase_fast_shutdown
;
srv_fast_shutdown
=
(
ibool
)
innobase_fast_shutdown
;
srv_file_per_table
=
(
ibool
)
innobase_file_per_table
;
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
;
srv_max_n_open_files
=
(
ulint
)
innobase_open_files
;
...
...
sql/ha_innodb.h
View file @
3ca686c5
...
@@ -189,7 +189,7 @@ extern char *innobase_unix_file_flush_method;
...
@@ -189,7 +189,7 @@ extern char *innobase_unix_file_flush_method;
/* The following variables have to be my_bool for SHOW VARIABLES to work */
/* The following variables have to be my_bool for SHOW VARIABLES to work */
extern
my_bool
innobase_log_archive
,
extern
my_bool
innobase_log_archive
,
innobase_use_native_aio
,
innobase_fast_shutdown
,
innobase_use_native_aio
,
innobase_fast_shutdown
,
innobase_file_per_table
;
innobase_file_per_table
,
innobase_locks_unsafe_for_binlog
;
extern
"C"
{
extern
"C"
{
extern
ulong
srv_max_buf_pool_modified_pct
;
extern
ulong
srv_max_buf_pool_modified_pct
;
}
}
...
...
sql/mysqld.cc
View file @
3ca686c5
...
@@ -3880,6 +3880,7 @@ enum options_mysqld
...
@@ -3880,6 +3880,7 @@ enum options_mysqld
OPT_INNODB_FLUSH_METHOD
,
OPT_INNODB_FLUSH_METHOD
,
OPT_INNODB_FAST_SHUTDOWN
,
OPT_INNODB_FAST_SHUTDOWN
,
OPT_INNODB_FILE_PER_TABLE
,
OPT_CRASH_BINLOG_INNODB
,
OPT_INNODB_FILE_PER_TABLE
,
OPT_CRASH_BINLOG_INNODB
,
OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG
,
OPT_SAFE_SHOW_DB
,
OPT_INNODB_SAFE_BINLOG
,
OPT_SAFE_SHOW_DB
,
OPT_INNODB_SAFE_BINLOG
,
OPT_INNODB
,
OPT_ISAM
,
OPT_NDBCLUSTER
,
OPT_SKIP_SAFEMALLOC
,
OPT_INNODB
,
OPT_ISAM
,
OPT_NDBCLUSTER
,
OPT_SKIP_SAFEMALLOC
,
OPT_TEMP_POOL
,
OPT_TX_ISOLATION
,
OPT_TEMP_POOL
,
OPT_TX_ISOLATION
,
...
@@ -4156,6 +4157,10 @@ Disable with --skip-bdb (will save memory).",
...
@@ -4156,6 +4157,10 @@ Disable with --skip-bdb (will save memory).",
"Stores each InnoDB table to an .ibd file in the database dir."
,
"Stores each InnoDB table to an .ibd file in the database dir."
,
(
gptr
*
)
&
innobase_file_per_table
,
(
gptr
*
)
&
innobase_file_per_table
,
(
gptr
*
)
&
innobase_file_per_table
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
(
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 */
#endif
/* End HAVE_INNOBASE_DB */
{
"init-connect"
,
OPT_INIT_CONNECT
,
"Command(s) that are executed for each new connection"
,
{
"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
,
(
gptr
*
)
&
opt_init_connect
,
(
gptr
*
)
&
opt_init_connect
,
0
,
GET_STR_ALLOC
,
...
...
sql/set_var.cc
View file @
3ca686c5
...
@@ -673,6 +673,7 @@ struct show_var_st init_vars[]= {
...
@@ -673,6 +673,7 @@ struct show_var_st init_vars[]= {
{
"innodb_fast_shutdown"
,
(
char
*
)
&
innobase_fast_shutdown
,
SHOW_MY_BOOL
},
{
"innodb_fast_shutdown"
,
(
char
*
)
&
innobase_fast_shutdown
,
SHOW_MY_BOOL
},
{
"innodb_file_io_threads"
,
(
char
*
)
&
innobase_file_io_threads
,
SHOW_LONG
},
{
"innodb_file_io_threads"
,
(
char
*
)
&
innobase_file_io_threads
,
SHOW_LONG
},
{
"innodb_file_per_table"
,
(
char
*
)
&
innobase_file_per_table
,
SHOW_MY_BOOL
},
{
"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_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_flush_method"
,
(
char
*
)
&
innobase_unix_file_flush_method
,
SHOW_CHAR_PTR
},
{
"innodb_force_recovery"
,
(
char
*
)
&
innobase_force_recovery
,
SHOW_LONG
},
{
"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