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
0f28f7a4
Commit
0f28f7a4
authored
Jan 22, 2001
by
monty@donna.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep bk happy
parent
8a9b1e92
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
414 additions
and
400 deletions
+414
-400
Docs/manual.texi
Docs/manual.texi
+5
-0
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+2
-2
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+33
-27
sql/item_func.cc
sql/item_func.cc
+11
-7
sql/mini_client.cc
sql/mini_client.cc
+4
-4
sql/slave.cc
sql/slave.cc
+342
-343
sql/sql_repl.cc
sql/sql_repl.cc
+16
-16
sql/sql_show.cc
sql/sql_show.cc
+1
-1
No files found.
Docs/manual.texi
View file @
0f28f7a4
...
@@ -40712,6 +40712,11 @@ not yet 100 % confident in this code.
...
@@ -40712,6 +40712,11 @@ not yet 100 % confident in this code.
@appendixsubsec Changes in release 3.23.32
@appendixsubsec Changes in release 3.23.32
@itemize @bullet
@itemize @bullet
@item
@item
Fixed bug in @code{SHOW LOGS} when there wheren't any BDB logs.
@item
Fixed a timing problem in replication that could delay sending an update
to the client until a new update was done.
@item
Don't convert field names when using @code{mysql_list_fields()}. This is
Don't convert field names when using @code{mysql_list_fields()}. This is
to keep this code compatible with @code{SHOW FIELDS}.
to keep this code compatible with @code{SHOW FIELDS}.
@item
@item
mysql-test/mysql-test-run.sh
View file @
0f28f7a4
...
@@ -239,7 +239,7 @@ SLAVE_MYSQLD=$MYSQLD #this can be changed later if we are doing gcov
...
@@ -239,7 +239,7 @@ SLAVE_MYSQLD=$MYSQLD #this can be changed later if we are doing gcov
#--
#--
wait_for_server_start
()
wait_for_server_start
()
{
{
$MYSQL
-e
"select 1"
--silent
-w1
--host
=
127.0.0.1
--port
=
$1
\
$MYSQL
-
-no-defaults
-u
$DBUSER
-
e
"select 1"
--silent
-w1
--host
=
127.0.0.1
--port
=
$1
\
>
/dev/null
>
/dev/null
}
}
...
@@ -492,7 +492,7 @@ mysql_restart () {
...
@@ -492,7 +492,7 @@ mysql_restart () {
mysql_loadstd
()
{
mysql_loadstd
()
{
cp
$STD_DATA
/
*
.frm
$STD_DATA
/
*
.MRG
$MASTER_MYDDIR
/test
#
cp $STD_DATA/*.frm $STD_DATA/*.MRG $MASTER_MYDDIR/test
return
1
return
1
}
}
...
...
sql/ha_berkeley.cc
View file @
0f28f7a4
...
@@ -253,27 +253,33 @@ int berkeley_show_logs(THD *thd)
...
@@ -253,27 +253,33 @@ int berkeley_show_logs(THD *thd)
{
{
DBUG_PRINT
(
"error"
,
(
"log_archive failed (error %d)"
,
error
));
DBUG_PRINT
(
"error"
,
(
"log_archive failed (error %d)"
,
error
));
db_env
->
err
(
db_env
,
error
,
"log_archive: DB_ARCH_ABS"
);
db_env
->
err
(
db_env
,
error
,
"log_archive: DB_ARCH_ABS"
);
if
(
error
==
DB_NOTFOUND
)
error
=
0
;
// No log files
goto
err
;
goto
err
;
}
}
/* Error is 0 here */
for
(
a
=
all_logs
,
f
=
free_logs
;
*
a
;
++
a
)
if
(
all_logs
)
{
{
packet
->
length
(
0
);
for
(
a
=
all_logs
,
f
=
free_logs
;
*
a
;
++
a
)
net_store_data
(
packet
,
*
a
);
net_store_data
(
packet
,
"BDB"
);
if
(
*
f
&&
strcmp
(
*
a
,
*
f
)
==
0
)
{
{
++
f
;
packet
->
length
(
0
);
net_store_data
(
packet
,
SHOW_LOG_STATUS_FREE
);
net_store_data
(
packet
,
*
a
);
}
net_store_data
(
packet
,
"BDB"
);
else
if
(
f
&&
*
f
&&
strcmp
(
*
a
,
*
f
)
==
0
)
net_store_data
(
packet
,
SHOW_LOG_STATUS_INUSE
);
{
++
f
;
net_store_data
(
packet
,
SHOW_LOG_STATUS_FREE
);
}
else
net_store_data
(
packet
,
SHOW_LOG_STATUS_INUSE
);
if
(
my_net_write
(
&
thd
->
net
,(
char
*
)
packet
->
ptr
(),
packet
->
length
()))
if
(
my_net_write
(
&
thd
->
net
,(
char
*
)
packet
->
ptr
(),
packet
->
length
()))
goto
err
;
{
error
=
1
;
goto
err
;
}
}
}
}
error
=
0
;
err:
err:
free_root
(
&
show_logs_root
,
MYF
(
0
));
free_root
(
&
show_logs_root
,
MYF
(
0
));
my_pthread_setspecific_ptr
(
THR_MALLOC
,
old_root
);
my_pthread_setspecific_ptr
(
THR_MALLOC
,
old_root
);
...
@@ -317,12 +323,12 @@ void berkeley_cleanup_log_files(void)
...
@@ -317,12 +323,12 @@ void berkeley_cleanup_log_files(void)
}
}
if
(
names
)
if
(
names
)
{
/* purecov: tested */
{
/* purecov: tested */
char
**
np
;
/* purecov: tested */
char
**
np
;
/* purecov: tested */
for
(
np
=
names
;
*
np
;
++
np
)
/* purecov: tested */
for
(
np
=
names
;
*
np
;
++
np
)
/* purecov: tested */
my_delete
(
*
np
,
MYF
(
MY_WME
));
/* purecov: tested */
my_delete
(
*
np
,
MYF
(
MY_WME
));
/* purecov: tested */
free
(
names
);
/* purecov: tested */
free
(
names
);
/* purecov: tested */
}
}
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
@@ -526,9 +532,9 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
...
@@ -526,9 +532,9 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
{
{
if
((
error
=
db_create
(
ptr
,
db_env
,
0
)))
if
((
error
=
db_create
(
ptr
,
db_env
,
0
)))
{
{
close
();
/* purecov: inspected */
close
();
/* purecov: inspected */
my_errno
=
error
;
/* purecov: inspected */
my_errno
=
error
;
/* purecov: inspected */
DBUG_RETURN
(
1
);
/* purecov: inspected */
DBUG_RETURN
(
1
);
/* purecov: inspected */
}
}
sprintf
(
part
,
"key%02d"
,
++
used_keys
);
sprintf
(
part
,
"key%02d"
,
++
used_keys
);
key_type
[
i
]
=
table
->
key_info
[
i
].
flags
&
HA_NOSAME
?
DB_NOOVERWRITE
:
0
;
key_type
[
i
]
=
table
->
key_info
[
i
].
flags
&
HA_NOSAME
?
DB_NOOVERWRITE
:
0
;
...
@@ -539,9 +545,9 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
...
@@ -539,9 +545,9 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
if
((
error
=
((
*
ptr
)
->
open
(
*
ptr
,
name_buff
,
part
,
DB_BTREE
,
if
((
error
=
((
*
ptr
)
->
open
(
*
ptr
,
name_buff
,
part
,
DB_BTREE
,
open_mode
,
0
))))
open_mode
,
0
))))
{
{
close
();
/* purecov: inspected */
close
();
/* purecov: inspected */
my_errno
=
error
;
/* purecov: inspected */
my_errno
=
error
;
/* purecov: inspected */
DBUG_RETURN
(
1
);
/* purecov: inspected */
DBUG_RETURN
(
1
);
/* purecov: inspected */
}
}
}
}
}
}
...
@@ -1042,6 +1048,7 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
...
@@ -1042,6 +1048,7 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
ulong
thd_options
=
table
->
in_use
?
table
->
in_use
->
options
:
0
;
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"
);
LINT_INIT
(
error
);
statistic_increment
(
ha_update_count
,
&
LOCK_status
);
statistic_increment
(
ha_update_count
,
&
LOCK_status
);
if
(
table
->
time_stamp
)
if
(
table
->
time_stamp
)
...
@@ -1066,7 +1073,6 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
...
@@ -1066,7 +1073,6 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
}
}
sub_trans
=
transaction
;
sub_trans
=
transaction
;
LINT_INIT
(
error
);
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
;
...
...
sql/item_func.cc
View file @
0f28f7a4
...
@@ -1399,14 +1399,18 @@ longlong Item_master_pos_wait::val_int()
...
@@ -1399,14 +1399,18 @@ longlong Item_master_pos_wait::val_int()
String
*
log_name
=
args
[
0
]
->
val_str
(
&
value
);
String
*
log_name
=
args
[
0
]
->
val_str
(
&
value
);
int
event_count
;
int
event_count
;
if
(
thd
->
slave_thread
||
!
log_name
||
!
log_name
->
length
())
null_value
=
0
;
{
if
(
thd
->
slave_thread
||
!
log_name
||
!
log_name
->
length
())
null_value
=
1
;
{
return
0
;
null_value
=
1
;
}
return
0
;
}
ulong
pos
=
(
ulong
)
args
[
1
]
->
val_int
();
ulong
pos
=
(
ulong
)
args
[
1
]
->
val_int
();
if
((
event_count
=
glob_mi
.
wait_for_pos
(
thd
,
log_name
,
pos
))
==
-
1
)
if
((
event_count
=
glob_mi
.
wait_for_pos
(
thd
,
log_name
,
pos
))
==
-
1
)
null_value
=
1
;;
{
null_value
=
1
;
event_count
=
0
;
}
return
event_count
;
return
event_count
;
}
}
...
...
sql/mini_client.cc
View file @
0f28f7a4
...
@@ -298,9 +298,9 @@ static int mc_sock_connect(my_socket s, const struct sockaddr *name,
...
@@ -298,9 +298,9 @@ static int mc_sock_connect(my_socket s, const struct sockaddr *name,
return
(
-
1
);
return
(
-
1
);
if
(
s_err
)
if
(
s_err
)
{
/
* getsockopt() could suceed */
{
/
/ getsockopt() could succeed
errno
=
s_err
;
errno
=
s_err
;
return
(
-
1
);
/
* but return an error... */
return
(
-
1
);
/
/ but return an error...
}
}
return
(
0
);
/* It's all good! */
return
(
0
);
/* It's all good! */
#endif
#endif
...
@@ -403,8 +403,8 @@ my_bool STDCALL mc_mysql_reconnect(MYSQL *mysql)
...
@@ -403,8 +403,8 @@ my_bool STDCALL mc_mysql_reconnect(MYSQL *mysql)
int
STDCALL
int
STDCALL
mc_simple_command
(
MYSQL
*
mysql
,
enum
enum_server_command
command
,
const
char
*
arg
,
mc_simple_command
(
MYSQL
*
mysql
,
enum
enum_server_command
command
,
uint
length
,
my_bool
skipp_check
)
const
char
*
arg
,
uint
length
,
my_bool
skipp_check
)
{
{
NET
*
net
=
&
mysql
->
net
;
NET
*
net
=
&
mysql
->
net
;
int
result
=
-
1
;
int
result
=
-
1
;
...
...
sql/slave.cc
View file @
0f28f7a4
This diff is collapsed.
Click to expand it.
sql/sql_repl.cc
View file @
0f28f7a4
...
@@ -311,29 +311,30 @@ sweepstakes if you report the bug";
...
@@ -311,29 +311,30 @@ sweepstakes if you report the bug";
// we need to start a packet with something other than 255
// we need to start a packet with something other than 255
// to distiquish it from error
// to distiquish it from error
if
(
pos
==
4
)
// tell the client log name with a fake rotate_event
// tell the client log name with a fake rotate_event
// if we are at the start of the log
// if we are at the start of the log
{
if
(
pos
==
4
)
if
(
fake_rotate_event
(
net
,
packet
,
log_file_name
,
&
errmsg
))
{
goto
err
;
if
(
fake_rotate_event
(
net
,
packet
,
log_file_name
,
&
errmsg
))
packet
->
length
(
0
);
goto
err
;
packet
->
append
(
"
\0
"
,
1
);
packet
->
length
(
0
);
}
packet
->
append
(
"
\0
"
,
1
);
}
while
(
!
net
->
error
&&
net
->
vio
!=
0
&&
!
thd
->
killed
)
while
(
!
net
->
error
&&
net
->
vio
!=
0
&&
!
thd
->
killed
)
{
{
pthread_mutex_t
*
log_lock
=
mysql_bin_log
.
get_log_lock
();
pthread_mutex_t
*
log_lock
=
mysql_bin_log
.
get_log_lock
();
while
(
!
(
error
=
Log_event
::
read_log_event
(
&
log
,
packet
,
log_lock
)))
while
(
!
(
error
=
Log_event
::
read_log_event
(
&
log
,
packet
,
log_lock
)))
{
{
if
(
my_net_write
(
net
,
(
char
*
)
packet
->
ptr
(),
packet
->
length
())
)
if
(
my_net_write
(
net
,
(
char
*
)
packet
->
ptr
(),
packet
->
length
())
)
{
{
errmsg
=
"Failed on my_net_write()"
;
errmsg
=
"Failed on my_net_write()"
;
goto
err
;
goto
err
;
}
}
DBUG_PRINT
(
"info"
,
(
"log event code %d"
,
DBUG_PRINT
(
"info"
,
(
"log event code %d"
,
(
*
packet
)[
LOG_EVENT_OFFSET
+
1
]
));
(
*
packet
)[
LOG_EVENT_OFFSET
+
1
]
));
if
((
*
packet
)[
LOG_EVENT_OFFSET
+
1
]
==
LOAD_EVENT
)
if
((
*
packet
)[
LOG_EVENT_OFFSET
+
1
]
==
LOAD_EVENT
)
{
{
if
(
send_file
(
thd
))
if
(
send_file
(
thd
))
{
{
...
@@ -345,8 +346,7 @@ sweepstakes if you report the bug";
...
@@ -345,8 +346,7 @@ sweepstakes if you report the bug";
packet
->
append
(
"
\0
"
,
1
);
packet
->
append
(
"
\0
"
,
1
);
}
}
if
(
error
!=
LOG_READ_EOF
)
if
(
error
!=
LOG_READ_EOF
)
{
{
switch
(
error
)
switch
(
error
)
{
{
...
@@ -399,7 +399,8 @@ sweepstakes if you report the bug";
...
@@ -399,7 +399,8 @@ sweepstakes if you report the bug";
// no one will update the log while we are reading
// no one will update the log while we are reading
// now, but we'll be quick and just read one record
// now, but we'll be quick and just read one record
switch
(
Log_event
::
read_log_event
(
&
log
,
packet
,
log_lock
))
pthread_mutex_lock
(
log_lock
);
switch
(
Log_event
::
read_log_event
(
&
log
,
packet
,
(
pthread_mutex_t
*
)
0
))
{
{
case
0
:
case
0
:
read_packet
=
1
;
read_packet
=
1
;
...
@@ -407,15 +408,14 @@ sweepstakes if you report the bug";
...
@@ -407,15 +408,14 @@ sweepstakes if you report the bug";
// slave
// slave
break
;
break
;
case
LOG_READ_EOF
:
case
LOG_READ_EOF
:
pthread_mutex_lock
(
log_lock
);
pthread_cond_wait
(
&
COND_binlog_update
,
log_lock
);
pthread_cond_wait
(
&
COND_binlog_update
,
log_lock
);
pthread_mutex_unlock
(
log_lock
);
break
;
break
;
default:
default:
fatal_error
=
1
;
fatal_error
=
1
;
break
;
break
;
}
}
pthread_mutex_unlock
(
log_lock
);
pthread_mutex_lock
(
&
thd
->
mysys_var
->
mutex
);
pthread_mutex_lock
(
&
thd
->
mysys_var
->
mutex
);
thd
->
mysys_var
->
current_mutex
=
0
;
thd
->
mysys_var
->
current_mutex
=
0
;
...
...
sql/sql_show.cc
View file @
0f28f7a4
...
@@ -592,7 +592,7 @@ mysqld_show_logs(THD *thd)
...
@@ -592,7 +592,7 @@ mysqld_show_logs(THD *thd)
#ifdef HAVE_BERKELEY_DB
#ifdef HAVE_BERKELEY_DB
if
(
berkeley_show_logs
(
thd
))
if
(
berkeley_show_logs
(
thd
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
-
1
);
#endif
#endif
send_eof
(
&
thd
->
net
);
send_eof
(
&
thd
->
net
);
...
...
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