diff options
author | unknown <serg@serg.mylan> | 2004-12-22 22:59:19 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-12-22 22:59:19 +0100 |
commit | baac3b76acb9d11061d65a9e462a6c405985f711 (patch) | |
tree | 64e3e4bbd361b21348faf03b9857bb8e63a3766b | |
parent | 6cbcd3423afd72961d7f04c5536426ba92e24db8 (diff) | |
download | mariadb-git-baac3b76acb9d11061d65a9e462a6c405985f711.tar.gz |
BitKeeper/triggers/pre-delta
don't checkin for Administrator or mysqldev
sql/log.cc@1.157
restored a bugfix that was lost in a merge
sql/log.cc:
restored a bugfix that was lost in a merge
BitKeeper/triggers/pre-delta:
don't commit for Administrator or mysqldev
-rwxr-xr-x | BitKeeper/triggers/pre-delta | 11 | ||||
-rw-r--r-- | sql/log.cc | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/BitKeeper/triggers/pre-delta b/BitKeeper/triggers/pre-delta index e22ae9ce940..cd861703bb5 100755 --- a/BitKeeper/triggers/pre-delta +++ b/BitKeeper/triggers/pre-delta @@ -1,5 +1,16 @@ #!/bin/sh +if [ "$BK_USER" = "Administrator" -o "$BK_USER" = "mysqldev" ] +then + echo "Error: you cannot checkin as 'Administrator' or 'mysqldev' user." + echo "as a workaround set BK_USER to your nickname" + echo "e.g.: export BK_USER='bar'" + echo "" + echo "Checkin FAILED!" + echo "Set BK_USER and retry." + exit 1 +fi + if [ `tail -c1 $BK_FILE` ] then echo "File $BK_FILE does not end with a new-line character!" diff --git a/sql/log.cc b/sql/log.cc index 3a420866025..ab0cb823f15 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2036,6 +2036,7 @@ bool flush_error_log() char err_renamed[FN_REFLEN], *end; end= strmake(err_renamed,log_error_file,FN_REFLEN-4); strmov(end, "-old"); + VOID(pthread_mutex_lock(&LOCK_error_log)); #ifdef __WIN__ char err_temp[FN_REFLEN+4]; /* @@ -2056,7 +2057,7 @@ bool flush_error_log() if ((fd = my_open(err_temp, O_RDONLY, MYF(0))) >= 0) { while ((bytes = (int) my_read(fd, (byte*) buf, IO_SIZE, MYF(0))) > 0) - my_fwrite(stderr, (byte*) buf, (uint) strlen(buf),MYF(0)); + my_fwrite(stderr, (byte*) buf, bytes, MYF(0)); my_close(fd, MYF(0)); } (void) my_delete(err_temp, MYF(0)); @@ -2070,6 +2071,7 @@ bool flush_error_log() else result= 1; #endif + VOID(pthread_mutex_unlock(&LOCK_error_log)); } return result; } |