Commit 0b5e975c authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-8654 - Remove mysqlbug

mysqlbug has been obsolete since MySQL 5.5, and has been removed in MySQL 5.7.
It's also of no use for reporting MariaDB bugs. The script and the associated
man page removed from MariaDB.
parent e562b432
......@@ -2,7 +2,6 @@ usr/bin/innochecksum
usr/bin/innotop
usr/bin/mysqlaccess
usr/bin/mysqladmin
usr/bin/mysqlbug
usr/bin/mysqldump
usr/bin/mysqldumpslow
usr/bin/mysql_find_rows
......@@ -15,7 +14,6 @@ usr/bin/mysql_waitpid
usr/share/man/man1/innotop.1
usr/share/man/man1/mysqlaccess.1
usr/share/man/man1/mysqladmin.1
usr/share/man/man1/mysqlbug.1
usr/share/man/man1/mysqldump.1
usr/share/man/man1/mysqldumpslow.1
usr/share/man/man1/mysql_find_rows.1
......
......@@ -19,7 +19,7 @@ mysqld_safe\[[0-9]+\]: ended$
mysqld_safe\[[0-9]+\]: http://www.mysql.com$
mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$
mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$
mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$
mysqld_safe\[[0-9]+\]: Please report any problems at http://mariadb.org/jira$
mysqld_safe\[[0-9]+\]: See the manual for more instructions.$
mysqld_safe\[[0-9]+\]: started$
mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at https://order.mysql.com$
......
......@@ -19,7 +19,7 @@ mysqld_safe\[[0-9]+\]: ended$
mysqld_safe\[[0-9]+\]: http://www.mysql.com$
mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$
mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$
mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$
mysqld_safe\[[0-9]+\]: Please report any problems at http://mariadb.org/jira$
mysqld_safe\[[0-9]+\]: See the manual for more instructions.$
mysqld_safe\[[0-9]+\]: started$
mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at https://order.mysql.com$
......
......@@ -22,7 +22,7 @@ SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1
mysql_tzinfo_to_sql.1 mysql_upgrade.1 mysql_zap.1
mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1
mysqltest.1 perror.1 replace.1 resolve_stack_dump.1
resolveip.1 mysqlbug.1)
resolveip.1)
SET(MAN8_SERVER mysqld.8)
SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1
mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1
......
'\" t
.\"
.TH "\FBMYSQLBUG\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.\" mysqlbug
.SH "NAME"
mysqlbug \- generate bug report
.SH "SYNOPSIS"
.HP \w'\fBmysqlbug\fR\ 'u
\fBmysqlbug\fR
.SH "DESCRIPTION"
.PP
To report MariaDB bugs, see https://mariadb.com/kb/en/mariadb/reporting-bugs/ - the mysqlbug program has now been deprecated by Oracle, and was never useful for MariaDB.
Originally, the program enabled you to generate a bug report and send it to Oracle Corporation\&. It is a shell script and runs on Unix\&.
.PP
The normal way to report MySQL bugs is to visit
\m[blue]\fB\%http://bugs.mysql.com/\fR\m[], which is the address for MySQL's bugs database\&. This database is public and can be browsed and searched by anyone\&. If you log in to the system, you can enter new reports\&. If you have no Web access, you can generate a bug report by using the
\fBmysqlbug\fR
script\&.
.PP
\fBmysqlbug\fR
helps you generate a report by determining much of the following information automatically, but if something important is missing, please include it with your message\&.
\fBmysqlbug\fR
can be found in the
scripts
directory (source distribution) and in the
bin
directory under your MySQL installation directory (binary distribution)\&.
.PP
Invoke
\fBmysqlbug\fR
without arguments:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysqlbug\fR
.fi
.if n \{\
.RE
.\}
.PP
The script will place you in an editor with a copy of the report to be sent\&. Edit the lines near the beginning that indicate the nature of the problem\&. Then write the file to save your changes, quit the editor, and
\fBmysqlbug\fR
will send the report by email\&.
.SH "COPYRIGHT"
.br
.PP
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).
......@@ -135,42 +135,6 @@ ENDIF()
SET(HOSTNAME "hostname")
SET(MYSQLD_USER "mysql")
# Required for mysqlbug until autotools are deprecated, once done remove these
# and expand default cmake variables
SET(CC ${CMAKE_C_COMPILER})
SET(CXX ${CMAKE_CXX_COMPILER})
SET(SAVE_CC ${CMAKE_C_COMPILER})
SET(SAVE_CXX ${CMAKE_CXX_COMPILER})
SET(SAVE_CFLAGS ${CFLAGS})
SET(SAVE_CXXFLAGS ${CXXFLAGS})
# XXX no cmake equivalent for this, just make one up
SET(CONFIGURE_LINE "Built using CMake")
# Also required for mysqlbug, autoconf only supports --version so for now we
# just explicitly require GNU
EXECUTE_PROCESS(
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} --version
COMMAND sed 1q
ERROR_QUIET
OUTPUT_VARIABLE CC_VERSION)
EXECUTE_PROCESS(
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version
COMMAND sed 1q
ERROR_QUIET
OUTPUT_VARIABLE CXX_VERSION)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysqlbug.sh
${CMAKE_CURRENT_BINARY_DIR}/mysqlbug ESCAPE_QUOTES @ONLY)
EXECUTE_PROCESS(
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/mysqlbug
)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/mysqlbug
DESTINATION ${INSTALL_BINDIR}
COMPONENT Server
)
ENDIF(UNIX)
# Really ugly, one script, "mysql_install_db", needs prefix set to ".",
......
#!/bin/sh
# Copyright (C) 2000-2002, 2004 MySQL AB
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Create a bug report and mail it to the mysql mailing list
# Based on glibc bug reporting script.
echo "Finding system information for a MySQL bug report"
VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@"
COMPILATION_COMMENT="@COMPILATION_COMMENT@"
BUGmysql="maria-developers@lists.launchpad.net"
# This is set by configure
COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'"
COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'"
CONFIGURE_LINE="@CONF_COMMAND@"
LIBC_INFO=""
for pat in /lib/libc.* /lib/libc-* /usr/lib/libc.* /usr/lib/libc-*
do
TMP=`ls -l $pat 2>/dev/null`
if test $? = 0
then
LIBC_INFO="$LIBC_INFO
$TMP"
fi
done
PATH=../client:$PATH:/bin:/usr/bin:/usr/local/bin
export PATH
BUGADDR=${1-$BUGmysql}
ENVIRONMENT=`uname -a`
: ${USER=${LOGNAME-`whoami`}}
COMMAND=`echo $0|sed 's%.*/\([^/]*\)%\1%'`
# Try to create a secure tmpfile
umask 077
TEMPDIR=/tmp/mysqlbug-$$
mkdir $TEMPDIR || (echo "can not create directory in /tmp, aborting"; exit 1;)
TEMP=${TEMPDIR}/mysqlbug
trap 'rm -f $TEMP $TEMP.x; rmdir $TEMPDIR; exit 1' 1 2 3 13 15
trap 'rm -f $TEMP $TEMP.x; rmdir $TEMPDIR' 0
# How to read the passwd database.
PASSWD="cat /etc/passwd"
if test -f /usr/lib/sendmail
then
MAIL_AGENT="/usr/lib/sendmail -oi -t"
elif test -f /usr/sbin/sendmail
then
MAIL_AGENT="/usr/sbin/sendmail -oi -t"
else
MAIL_AGENT="rmail $BUGmysql"
fi
# Figure out how to echo a string without a trailing newline
N=`echo 'hi there\c'`
case "$N" in
*c) ECHON1='echo -n' ECHON2= ;;
*) ECHON1=echo ECHON2='\c' ;;
esac
# Find out the name of the originator of this PR.
if test -n "$NAME"
then
ORIGINATOR="$NAME"
elif test -f $HOME/.fullname
then
ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
else
# Must use temp file due to incompatibilities in quoting behavior
# and to protect shell metacharacters in the expansion of $LOGNAME
$PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $TEMP
ORIGINATOR="`cat $TEMP`"
rm -f $TEMP
fi
if test -n "$ORGANIZATION"
then
if test -f "$ORGANIZATION"
then
ORGANIZATION="`cat $ORGANIZATION`"
fi
else
if test -f $HOME/.organization
then
ORGANIZATION="`cat $HOME/.organization`"
elif test -f $HOME/.signature
then
ORGANIZATION=`sed -e "s/^/ /" $HOME/.signature; echo ">"`
fi
fi
PATH_DIRS=`echo $PATH | sed -e 's/^:/. /' -e 's/:$/ ./' -e 's/::/ . /g' -e 's/:/ /g' `
which_1 ()
{
for cmd
do
# Absolute path ?.
if expr "x$cmd" : "x/" > /dev/null
then
echo "$cmd"
exit 0
else
for d in $PATH_DIRS
do
file="$d/$cmd"
if test -x "$file" -a ! -d "$file"
then
echo "$file"
exit 0
fi
done
fi
done
exit 1
}
change_editor ()
{
echo "You can change editor by setting the environment variable VISUAL."
echo "If your shell is a bourne shell (sh) do"
echo "VISUAL=your_editors_name; export VISUAL"
echo "If your shell is a C shell (csh) do"
echo "setenv VISUAL your_editors_name"
}
# If they don't have a preferred editor set, then use emacs
if test -z "$VISUAL"
then
if test -z "$EDITOR"
then
# Honor debian sensible-editor
if test -x "/usr/bin/sensible-editor"
then
EDIT=/usr/bin/sensible-editor
else
EDIT=emacs
fi
else
EDIT="$EDITOR"
fi
else
EDIT="$VISUAL"
fi
#which_1 $EDIT
used_editor=`which_1 $EDIT`
echo "test -x $used_editor"
if test -x "$used_editor"
then
echo "Using editor $used_editor";
change_editor
sleep 2
else
echo "Could not find a text editor. (tried $EDIT)"
change_editor
exit 1
fi
# Find out some information.
SYSTEM=`( test -f /bin/uname && /bin/uname -a ) || \
( test -f /usr/bin/uname && /usr/bin/uname -a ) || echo ""`
ARCH=`test -f /bin/arch && /bin/arch`
MACHINE=`test -f /bin/machine && /bin/machine`
FILE_PATHS=
for cmd in perl make gmake gcc cc
do
file=`which_1 $cmd`
if test $? = 0
then
if test $cmd = "gcc"
then
GCC_INFO=`$file -v 2>&1`
elif test $cmd = "perl"
then
PERL_INFO=`$file -v | grep -i version 2>&1`
fi
FILE_PATHS="$FILE_PATHS $file"
fi
done
admin=`which_1 mysqladmin`
MYSQL_SERVER=
if test -x "$admin"
then
MYSQL_SERVER=`$admin version 2> /dev/null`
if test "$?" = "1"
then
MYSQL_SERVER=""
fi
fi
SUBJECT_C="[50 character or so descriptive subject here (for reference)]"
ORGANIZATION_C='<organization of PR author (multiple lines)>'
LICENCE_C='[none | licence | email support | extended email support ]'
SYNOPSIS_C='<synopsis of the problem (one line)>'
SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
PRIORITY_C='<[ low | medium | high ] (one line)>'
CLASS_C='<[ sw-bug | doc-bug | change-request | support ] (one line)>'
RELEASE_C='<release number or tag (one line)>'
ENVIRONMENT_C='<machine, os, target, libraries (multiple lines)>'
DESCRIPTION_C='<precise description of the problem (multiple lines)>'
HOW_TO_REPEAT_C='<code/input/activities to reproduce the problem (multiple lines)>'
FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
cat > $TEMP <<EOF
SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in \`<' and \`>').
SEND-PR:
From: ${USER}
To: ${BUGADDR}
Subject: $SUBJECT_C
>Description:
$DESCRIPTION_C
>How-To-Repeat:
$HOW_TO_REPEAT_C
>Fix:
$FIX_C
>Submitter-Id: <submitter ID>
>Originator: ${ORIGINATOR}
>Organization:
${ORGANIZATION- $ORGANIZATION_C}
>MySQL support: $LICENCE_C
>Synopsis: $SYNOPSIS_C
>Severity: $SEVERITY_C
>Priority: $PRIORITY_C
>Category: mysql
>Class: $CLASS_C
>Release: mysql-${VERSION} ($COMPILATION_COMMENT)
`test -n "$MYSQL_SERVER" && echo ">Server: $MYSQL_SERVER"`
>C compiler: @CC_VERSION@
>C++ compiler: @CXX_VERSION@
>Environment:
$ENVIRONMENT_C
`test -n "$SYSTEM" && echo "System: $SYSTEM"`
`test -n "$ARCH" && echo "Architecture: $ARCH"`
`test -n "$MACHINE" && echo "Machine: $MACHINE"`
`test -n "$FILE_PATHS" && echo "Some paths: $FILE_PATHS"`
`test -n "$GCC_INFO" && echo "GCC: $GCC_INFO"`
`test -n "$COMP_CALL_INFO" && echo "Compilation info (call): $COMP_CALL_INFO"`
`test -n "$COMP_RUN_INFO" && echo "Compilation info (used): $COMP_RUN_INFO"`
`test -n "$LIBC_INFO" && echo "LIBC: $LIBC_INFO"`
`test -n "$CONFIGURE_LINE" && echo "Configure command: $CONFIGURE_LINE"`
`test -n "$PERL_INFO" && echo "Perl: $PERL_INFO"`
EOF
chmod u+w $TEMP
cp $TEMP $TEMP.x
eval $EDIT $TEMP
if cmp -s $TEMP $TEMP.x
then
echo "File not changed, no bug report submitted."
mv -f $TEMP /tmp/failed-mysql-bugreport
echo "The raw bug report exists in /tmp/failed-mysql-bugreport"
echo "If you use this remember that the first lines of the report are now a lie.."
exit 1
fi
#
# Check the enumeration fields
# This is a "sed-subroutine" with one keyword parameter
# (with workaround for Sun sed bug)
#
SED_CMD='
/$PATTERN/{
s|||
s|<.*>||
s|^[ ]*||
s|[ ]*$||
p
q
}'
while :; do
CNT=0
#
# 1) Severity
#
PATTERN=">Severity:"
SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
case "$SEVERITY" in
""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
*) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
esac
#
# 2) Priority
#
PATTERN=">Priority:"
PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
case "$PRIORITY" in
""|low|medium|high) CNT=`expr $CNT + 1` ;;
*) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
esac
#
# 3) Class
#
PATTERN=">Class:"
CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
case "$CLASS" in
""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
*) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
esac
#
# 4) Synopsis
#
VALUE=`grep "^>Synopsis:" $TEMP | sed 's/>Synopsis:[ ]*//'`
case "$VALUE" in
"$SYNOPSIS_C") echo "$COMMAND: \`$VALUE' is not a valid value for \`Synopsis'." ;;
*) CNT=`expr $CNT + 1`
esac
test $CNT -lt 4 &&
echo "Errors were found with the problem report."
# Check if subject of mail was changed, if not, use Synopsis field
#
subject=`grep "^Subject" $TEMP| sed 's/^Subject:[ ]*//'`
if [ X"$subject" = X"$SUBJECT_C" -o X"$subject" = X"$SYNOPSIS_C" ]; then
subject=`grep Synopsis $TEMP | sed 's/>Synopsis:[ ]*//'`
sed "s/^Subject:[ ]*.*/Subject: $subject/" $TEMP > $TEMP.tmp
mv -f $TEMP.tmp $TEMP
fi
while :; do
$ECHON1 "a)bort, e)dit or s)end? $ECHON2"
read input
case "$input" in
a*)
echo "$COMMAND: problem report saved in $HOME/dead.mysqlbug."
cat $TEMP >> $HOME/dead.mysqlbug
xs=1; exit
;;
e*)
eval $EDIT $TEMP
continue 2
;;
s*)
break 2
;;
esac
done
done
#
# Remove comments and send the problem report
# (we have to use patterns, where the comment contains regex chars)
#
# /^>Originator:/s;$ORIGINATOR;;
sed -e "
/^SEND-PR:/d
/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
/^>Confidential:/s;<.*>;;
/^>Synopsis:/s;$SYNOPSIS_C;;
/^>Severity:/s;<.*>;;
/^>Priority:/s;<.*>;;
/^>Class:/s;<.*>;;
/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
" $TEMP > $TEMP.x
if $MAIL_AGENT < $TEMP.x
then
echo "$COMMAND: problem report sent"
xs=0; exit
else
echo "$COMMAND: mysterious mail failure, report not sent."
echo "$COMMAND: problem report saved in $HOME/dead.mysqlbug."
cat $TEMP >> $HOME/dead.mysqlbug
fi
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment