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
148f18fb
Commit
148f18fb
authored
Dec 31, 2000
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/my/mysql into donna.mysql.com:/home/my/bk/mysql
Docs/manual.texi: Auto merged
parents
067d2769
3c65e4f8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
58 deletions
+60
-58
Docs/manual.texi
Docs/manual.texi
+44
-28
myisam/mi_info.c
myisam/mi_info.c
+1
-1
scripts/safe_mysqld.sh
scripts/safe_mysqld.sh
+4
-2
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+4
-20
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+6
-6
No files found.
Docs/manual.texi
View file @
148f18fb
...
@@ -25511,12 +25511,13 @@ system:
...
@@ -25511,12 +25511,13 @@ system:
@itemize @bullet
@itemize @bullet
@item
@item
Upgrade both slave and master to Version 3.23.15 or higher. We recommend that
Upgrade both slave and master to Version 3.23.15 or higher. We recommend
you always use the latest release of Version 3.23 on both the slave and the
that you always use the latest release of Version 3.23 on both the slave
master. While Version 3.23 is in beta, the versions may be not backwards
and the master. The binary log format has also changed a couple of times
compatible. In addition, the newer version will fix some bugs and add
during development (before 3.23.29) so you should delete old binary logs
new features. Please, do not report bugs until you have verified that
when upgrading @strong{MySQL}. In addition, the newer version will fix
the problem is present in the latest release.
some bugs and add new features. Please, do not report bugs until you
have verified that the problem is present in the latest release.
@item
@item
Set up special replication user(s) on the master with the @code{FILE}
Set up special replication user(s) on the master with the @code{FILE}
privilege and permission to connect from all the slaves. If the user is
privilege and permission to connect from all the slaves. If the user is
...
@@ -25524,16 +25525,18 @@ only doing replication, you don't need to grant him other privileges.
...
@@ -25524,16 +25525,18 @@ only doing replication, you don't need to grant him other privileges.
@item
@item
Take a snapshot of all the tables/databases on the master that could
Take a snapshot of all the tables/databases on the master that could
possibly be involved in the update queries before taking the next step.
possibly be involved in the update queries before taking the next step.
Starting in Version 3.23.21, there is a command that allows you to
Starting in Version 3.23.21, there is a command that allows you to take
take a snapshot of a table on the master and copy it to the slave, called
a snapshot of a table on the master and copy it to the slave, called
@code{LOAD TABLE FROM MASTER}. Until Version 3.23.23, though, it has a serious
@code{LOAD TABLE FROM MASTER}. Until Version 3.23.23, though, it has a
bug, and we recommend that you do not use it until you have upgraded.
serious bug, and we recommend that you do not use it until you have
upgraded.
@item
@item
In @code{my.cnf} on the master add @code{log-bin} and restart it. Make
In @code{my.cnf} on the master add @code{log-bin} and
sure there are no important updates to the master between the time you
@code{server-id=unique number} and restart it. Make sure there are no
have taken the snapshot and the time the master is restarted with
important updates to the master between the time you have taken the
@code{log-bin} option.
snapshot and the time the master is restarted with @code{log-bin}
option.
@item
@item
Load the snapshot of the master to all the slaves.
Load the snapshot of the master to all the slaves.
@item
@item
...
@@ -25543,17 +25546,11 @@ Add the following to @code{my.cnf} on the slave(s):
...
@@ -25543,17 +25546,11 @@ Add the following to @code{my.cnf} on the slave(s):
master-host=<hostname of the master>
master-host=<hostname of the master>
master-user=<replication user name>
master-user=<replication user name>
master-password=<replication user password>
master-password=<replication user password>
server-id=<some unique number between 1 and 2^32-1>
@end example
@end example
replacing the values in <> with what is relevant to your system.
replacing the values in <> with what is relevant to your system.
Starting in Version 3.23.26, you must also have on both master and
slave
@example
server-id=<some unique number between 1 and 2^32-1>
@end example
@code{server-id} must be different for each server participating in
@code{server-id} must be different for each server participating in
replication. If you don't specify a server-id, it will be set to
replication. If you don't specify a server-id, it will be set to
1 if you have not defined @code{master-host}, else it will be set to 2.
1 if you have not defined @code{master-host}, else it will be set to 2.
...
@@ -25565,6 +25562,17 @@ replication. If you don't specify a server-id, it will be set to
...
@@ -25565,6 +25562,17 @@ replication. If you don't specify a server-id, it will be set to
After you have done the above, the master and the slave(s) should be in
After you have done the above, the master and the slave(s) should be in
sync.
sync.
If you have forgot to set server-id for the slave you will get the following
error in the error log file:
@example
Warning: one should set server_id to a non-0 value if master_host is set.
The server will not act as a slave.
@end example
If you have forgot to do this for the master, the slaves will not be able to
connect to the master.
@cindex options, replication
@cindex options, replication
@cindex @code{my.cnf} file
@cindex @code{my.cnf} file
@cindex files,@code{my.cnf}
@cindex files,@code{my.cnf}
...
@@ -33620,7 +33628,7 @@ Drop or rename @code{old_table}.
...
@@ -33620,7 +33628,7 @@ Drop or rename @code{old_table}.
@cindex replication
@cindex replication
@menu
@menu
* Log Replication:: Database replication with
update log
* Log Replication:: Database replication with update log
* Backup:: Database backups
* Backup:: Database backups
* Update log:: The update log
* Update log:: The update log
* Binary log:: The binary log
* Binary log:: The binary log
...
@@ -33637,12 +33645,13 @@ Now that master-slave internal replication is available starting in
...
@@ -33637,12 +33645,13 @@ Now that master-slave internal replication is available starting in
Version 3.23.15, this is the recommended way. @xref{Replication}.
Version 3.23.15, this is the recommended way. @xref{Replication}.
However, it is still possible to replicate a database by using the
However, it is still possible to replicate a database by using the
update log. @xref{Update log}. This requires one database that acts as a
update log or the binary log. @xref{Update log}. This requires one
master (to which data changes are made) and one or more other databases
database that acts as a master (to which data changes are made) and one
that act as slaves. To update a slave, just run @code{mysql <
or more other databases that act as slaves. To update a slave, just run
update_log}. Supply host, user, and password options that are
@code{mysql < update_log.*} or @code{mysqlbinlog binary_log.* | mysql}.
appropriate for the slave database, and use the update log from the
Supply host, user, and password options that are appropriate for the
master database as input.
slave database, and use the update log from the master database as
input.
If you never delete anything from a table, you can use a @code{TIMESTAMP}
If you never delete anything from a table, you can use a @code{TIMESTAMP}
column to find out which rows have been inserted or changed in the table
column to find out which rows have been inserted or changed in the table
...
@@ -33736,6 +33745,10 @@ a unique key value.
...
@@ -33736,6 +33745,10 @@ a unique key value.
@node Update log, Binary log, Backup, Common problems
@node Update log, Binary log, Backup, Common problems
@section The Update Log
@section The Update Log
@strong{NOTE}: The update log is replaced by the binary
log. @xref{Binary log}. With this you can do anything that you can do
with the update log.
When started with the @code{--log-update[=file_name]} option,
When started with the @code{--log-update[=file_name]} option,
@code{mysqld} writes a log file containing all SQL commands that update
@code{mysqld} writes a log file containing all SQL commands that update
data. If no filename is given, it defaults to the name of the host
data. If no filename is given, it defaults to the name of the host
...
@@ -40005,6 +40018,9 @@ though, so Version 3.23 is not released as a stable version yet.
...
@@ -40005,6 +40018,9 @@ though, so Version 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.30
@appendixsubsec Changes in release 3.23.30
@itemize @bullet
@itemize @bullet
@item
@item
Changed BDB tables to not use internal subtransactions and reuse open files to
get more speed.
@item
Added option @code{--mysqld=#} to @code{safe_mysqld}
Added option @code{--mysqld=#} to @code{safe_mysqld}
@item
@item
Allow hex constants in the @code{--fields-*-by} and
Allow hex constants in the @code{--fields-*-by} and
myisam/mi_info.c
View file @
148f18fb
...
@@ -57,7 +57,6 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
...
@@ -57,7 +57,6 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
x
->
index_file_length
=
info
->
state
->
key_file_length
;
x
->
index_file_length
=
info
->
state
->
key_file_length
;
x
->
keys
=
share
->
state
.
header
.
keys
;
x
->
keys
=
share
->
state
.
header
.
keys
;
x
->
key_map
=
share
->
state
.
key_map
;
x
->
check_time
=
share
->
state
.
check_time
;
x
->
check_time
=
share
->
state
.
check_time
;
x
->
mean_reclength
=
info
->
state
->
records
?
x
->
mean_reclength
=
info
->
state
->
records
?
(
ulong
)
(
info
->
state
->
data_file_length
-
info
->
state
->
empty
)
/
(
ulong
)
(
info
->
state
->
data_file_length
-
info
->
state
->
empty
)
/
...
@@ -87,6 +86,7 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
...
@@ -87,6 +86,7 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
x
->
raid_type
=
share
->
base
.
raid_type
;
x
->
raid_type
=
share
->
base
.
raid_type
;
x
->
raid_chunks
=
share
->
base
.
raid_chunks
;
x
->
raid_chunks
=
share
->
base
.
raid_chunks
;
x
->
raid_chunksize
=
share
->
base
.
raid_chunksize
;
x
->
raid_chunksize
=
share
->
base
.
raid_chunksize
;
x
->
key_map
=
share
->
state
.
key_map
;
}
}
if
((
flag
&
HA_STATUS_TIME
)
&&
!
my_fstat
(
info
->
dfile
,
&
state
,
MYF
(
0
)))
if
((
flag
&
HA_STATUS_TIME
)
&&
!
my_fstat
(
info
->
dfile
,
&
state
,
MYF
(
0
)))
x
->
update_time
=
state
.
st_mtime
;
x
->
update_time
=
state
.
st_mtime
;
...
...
scripts/safe_mysqld.sh
View file @
148f18fb
...
@@ -149,8 +149,10 @@ then
...
@@ -149,8 +149,10 @@ then
fi
fi
fi
fi
USER
=
""
if
test
-w
/
if
test
-w
/
then
then
USER_OPTION
=
"--user=
$user
"
# If we are root, change the err log to the right user.
# If we are root, change the err log to the right user.
touch
$err_log
;
chown
$user
$err_log
touch
$err_log
;
chown
$user
$err_log
if
test
-n
"
$open_files
"
if
test
-n
"
$open_files
"
...
@@ -211,9 +213,9 @@ do
...
@@ -211,9 +213,9 @@ do
rm
-f
$MYSQL_UNIX_PORT
$pid_file
# Some extra safety
rm
-f
$MYSQL_UNIX_PORT
$pid_file
# Some extra safety
if
test
-z
"
$args
"
if
test
-z
"
$args
"
then
then
$NOHUP_NICENESS
$ledir
/
$MYSQLD
$defaults
--basedir
=
$MY_BASEDIR_VERSION
--datadir
=
$DATADIR
--user
=
$user
--pid-file
=
$pid_file
@MYSQLD_DEFAULT_SWITCHES@
>>
$err_log
2>&1
$NOHUP_NICENESS
$ledir
/
$MYSQLD
$defaults
--basedir
=
$MY_BASEDIR_VERSION
--datadir
=
$DATADIR
$USER_OPTION
--pid-file
=
$pid_file
@MYSQLD_DEFAULT_SWITCHES@
>>
$err_log
2>&1
else
else
eval
"
$NOHUP_NICENESS
$ledir
/
$MYSQLD
$defaults
--basedir=
$MY_BASEDIR_VERSION
--datadir=
$DATADIR
--user=
$user
--pid-file=
$pid_file
@MYSQLD_DEFAULT_SWITCHES@
$args
>>
$err_log
2>&1"
eval
"
$NOHUP_NICENESS
$ledir
/
$MYSQLD
$defaults
--basedir=
$MY_BASEDIR_VERSION
--datadir=
$DATADIR
$USER_OPTION
--pid-file=
$pid_file
@MYSQLD_DEFAULT_SWITCHES@
$args
>>
$err_log
2>&1"
fi
fi
if
test
!
-f
$pid_file
# This is removed if normal shutdown
if
test
!
-f
$pid_file
# This is removed if normal shutdown
then
then
...
...
sql/ha_berkeley.cc
View file @
148f18fb
...
@@ -796,7 +796,8 @@ int ha_berkeley::write_row(byte * record)
...
@@ -796,7 +796,8 @@ int ha_berkeley::write_row(byte * record)
else
else
{
{
DB_TXN
*
sub_trans
=
transaction
;
DB_TXN
*
sub_trans
=
transaction
;
ulong
thd_options
=
table
->
in_use
->
options
;
/* Don't use sub transactions in temporary tables (in_use == 0) */
ulong
thd_options
=
table
->
in_use
?
table
->
in_use
->
options
:
0
;
for
(
uint
retry
=
0
;
retry
<
berkeley_trans_retry
;
retry
++
)
for
(
uint
retry
=
0
;
retry
<
berkeley_trans_retry
;
retry
++
)
{
{
key_map
changed_keys
=
0
;
key_map
changed_keys
=
0
;
...
@@ -1014,7 +1015,7 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
...
@@ -1014,7 +1015,7 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
DBT
prim_key
,
key
,
old_prim_key
;
DBT
prim_key
,
key
,
old_prim_key
;
int
error
;
int
error
;
DB_TXN
*
sub_trans
;
DB_TXN
*
sub_trans
;
ulong
thd_options
=
table
->
in_use
->
options
;
ulong
thd_options
=
table
->
in_use
?
table
->
in_use
->
options
:
0
;
bool
primary_key_changed
;
bool
primary_key_changed
;
DBUG_ENTER
(
"update_row"
);
DBUG_ENTER
(
"update_row"
);
...
@@ -1112,23 +1113,6 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
...
@@ -1112,23 +1113,6 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
break
;
break
;
}
}
}
}
#ifdef BROKEN_CODE_HERE
int
new_error
;
DBUG_PRINT
(
"error"
,(
"Got error %d"
,
error
));
if
(
using_ignore
&&
(
thd_options
&
OPTION_INTERNAL_SUBTRANSACTIONS
))
{
DBUG_PRINT
(
"trans"
,(
"aborting subtransaction"
));
new_error
=
txn_abort
(
sub_trans
);
}
else
if
(
changed_keys
)
new_error
=
restore_keys
(
changed_keys
,
primary_key
,
old_row
,
old_prim_key
,
new_row
,
prim_key
);
if
(
new_error
)
{
error
=
new_error
;
// This shouldn't happen
break
;
}
#endif
}
}
else
if
(
using_ignore
&&
(
thd_options
&
OPTION_INTERNAL_SUBTRANSACTIONS
))
else
if
(
using_ignore
&&
(
thd_options
&
OPTION_INTERNAL_SUBTRANSACTIONS
))
{
{
...
@@ -1227,7 +1211,7 @@ int ha_berkeley::delete_row(const byte * record)
...
@@ -1227,7 +1211,7 @@ int ha_berkeley::delete_row(const byte * record)
int
error
;
int
error
;
DBT
row
,
prim_key
;
DBT
row
,
prim_key
;
key_map
keys
=
table
->
keys_in_use
;
key_map
keys
=
table
->
keys_in_use
;
ulong
thd_options
=
table
->
in_use
->
options
;
ulong
thd_options
=
table
->
in_use
?
table
->
in_use
->
options
:
0
;
DBUG_ENTER
(
"delete_row"
);
DBUG_ENTER
(
"delete_row"
);
statistic_increment
(
ha_delete_count
,
&
LOCK_status
);
statistic_increment
(
ha_delete_count
,
&
LOCK_status
);
...
...
sql/mysql_priv.h
View file @
148f18fb
...
@@ -164,7 +164,7 @@ void kill_one_thread(THD *thd, ulong id);
...
@@ -164,7 +164,7 @@ void kill_one_thread(THD *thd, ulong id);
#define OPTION_INTERNAL_SUBTRANSACTIONS OPTION_QUOTE_SHOW_CREATE*2
#define OPTION_INTERNAL_SUBTRANSACTIONS OPTION_QUOTE_SHOW_CREATE*2
/* Set if we are updating a non-transaction safe table */
/* Set if we are updating a non-transaction safe table */
#define OPTION_STATUS_NO_TRANS_UPDATE OPTION_
QUOTE_SHOW_CREATE
*2
#define OPTION_STATUS_NO_TRANS_UPDATE OPTION_
INTERNAL_SUBTRANSACTIONS
*2
/* The following is set when parsing the query */
/* The following is set when parsing the query */
#define QUERY_NO_INDEX_USED OPTION_STATUS_NO_TRANS_UPDATE*2
#define QUERY_NO_INDEX_USED OPTION_STATUS_NO_TRANS_UPDATE*2
...
...
sql/mysqld.cc
View file @
148f18fb
...
@@ -1120,8 +1120,8 @@ terribly wrong\n");
...
@@ -1120,8 +1120,8 @@ terribly wrong\n");
*
(
ebp
+
17
)
:
*
(
ebp
+
1
));
*
(
ebp
+
17
)
:
*
(
ebp
+
1
));
if
(
new_ebp
<=
ebp
)
if
(
new_ebp
<=
ebp
)
{
{
fprintf
(
stderr
,
"
New value of ebp failed sanity check
\
fprintf
(
stderr
,
"\
terminating backtrace
\n
"
);
New value of ebp failed sanity check
terminating backtrace
\n
"
);
return
;
return
;
}
}
ebp
=
new_ebp
;
ebp
=
new_ebp
;
...
@@ -1626,14 +1626,14 @@ int main(int argc, char **argv)
...
@@ -1626,14 +1626,14 @@ int main(int argc, char **argv)
#ifdef EXTRA_DEBUG
#ifdef EXTRA_DEBUG
case
1
:
case
1
:
sql_print_error
(
"\
sql_print_error
(
"\
Warning: one should set server
_
id to a non-0 value if log-bin is enabled.
\n
\
Warning: one should set server
-
id to a non-0 value if log-bin is enabled.
\n
\
Will log updates to binary log, but will not accept connections from slaves"
);
Will log updates to binary log, but will not accept connections from slaves
.
"
);
break
;
break
;
#endif
#endif
case
2
:
case
2
:
sql_print_error
(
"\
sql_print_error
(
"\
Warning: one should set server
_
id to a non-0 value if master_host is set.
\n
\
Warning: one should set server
-
id to a non-0 value if master_host is set.
\n
\
The server will not act as a slave"
);
The server will not act as a slave
.
"
);
break
;
break
;
}
}
}
}
...
...
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