Fixes for make_win_src_distributions
Removed compiler warnings
This commit is contained in:
parent
d33cb08eb6
commit
e090f2d0cc
@ -12,6 +12,7 @@ CP="cp -p"
|
|||||||
DEBUG=0
|
DEBUG=0
|
||||||
SILENT=0
|
SILENT=0
|
||||||
SUFFIX=""
|
SUFFIX=""
|
||||||
|
DIRNAME=""
|
||||||
OUTTAR=0
|
OUTTAR=0
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -75,6 +76,7 @@ parse_arguments() {
|
|||||||
--debug) DEBUG=1;;
|
--debug) DEBUG=1;;
|
||||||
--tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;;
|
--tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;;
|
||||||
--suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
|
--suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
|
||||||
|
--dirname=*) DIRNAME=`echo "$arg" | sed -e "s;--dirname=;;"` ;;
|
||||||
--silent) SILENT=1 ;;
|
--silent) SILENT=1 ;;
|
||||||
--tar) OUTTAR=1 ;;
|
--tar) OUTTAR=1 ;;
|
||||||
--help) show_usage ;;
|
--help) show_usage ;;
|
||||||
@ -155,11 +157,15 @@ mkdir $BASE/Docs $BASE/extra $BASE/include
|
|||||||
# Copy directory files
|
# Copy directory files
|
||||||
#
|
#
|
||||||
|
|
||||||
copy_dir_files() {
|
copy_dir_files()
|
||||||
|
{
|
||||||
for arg do
|
for arg do
|
||||||
print_debug "Copying files from directory '$arg'"
|
print_debug "Copying files from directory '$arg'"
|
||||||
cd $SOURCE/$arg/
|
cd $SOURCE/$arg
|
||||||
|
if [ ! -d $BASE/$arg ]; then
|
||||||
|
print_debug "Creating directory '$arg'"
|
||||||
|
mkdir $BASE/$arg
|
||||||
|
fi
|
||||||
for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \
|
for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \
|
||||||
README INSTALL* LICENSE
|
README INSTALL* LICENSE
|
||||||
do
|
do
|
||||||
@ -199,9 +205,6 @@ copy_dir_dirs() {
|
|||||||
for i in *
|
for i in *
|
||||||
do
|
do
|
||||||
if [ -d $SOURCE/$basedir/$i ] && [ "$i" != "SCCS" ]; then
|
if [ -d $SOURCE/$basedir/$i ] && [ "$i" != "SCCS" ]; then
|
||||||
if [ ! -d $BASE/$basedir/$i ]; then
|
|
||||||
mkdir $BASE/$basedir/$i
|
|
||||||
fi
|
|
||||||
copy_dir_files $basedir/$i
|
copy_dir_files $basedir/$i
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -214,7 +217,7 @@ copy_dir_dirs() {
|
|||||||
|
|
||||||
for i in client dbug extra heap include isam \
|
for i in client dbug extra heap include isam \
|
||||||
libmysql libmysqld merge myisam \
|
libmysql libmysqld merge myisam \
|
||||||
myisammrg mysys regex sql strings \
|
myisammrg mysys regex sql strings sql-common \
|
||||||
vio zlib
|
vio zlib
|
||||||
do
|
do
|
||||||
copy_dir_files $i
|
copy_dir_files $i
|
||||||
@ -270,15 +273,19 @@ done
|
|||||||
|
|
||||||
if [ -f scripts/mysql_install_db ]; then
|
if [ -f scripts/mysql_install_db ]; then
|
||||||
print_debug "Initializing the 'data' directory"
|
print_debug "Initializing the 'data' directory"
|
||||||
scripts/mysql_install_db --windows --datadir=$BASE/data
|
scripts/mysql_install_db --no-defaults --windows --datadir=$BASE/data
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Specify the distribution package name and copy it
|
# Specify the distribution package name and copy it
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if test -z $DIRNAME
|
||||||
|
then
|
||||||
NEW_DIR_NAME=mysql@MYSQL_SERVER_SUFFIX@-$version$SUFFIX
|
NEW_DIR_NAME=mysql@MYSQL_SERVER_SUFFIX@-$version$SUFFIX
|
||||||
|
else
|
||||||
|
NEW_DIR_NAME=$DIRNAME
|
||||||
|
fi
|
||||||
NEW_NAME=$NEW_DIR_NAME-win-src
|
NEW_NAME=$NEW_DIR_NAME-win-src
|
||||||
|
|
||||||
BASE2=$TMP/$NEW_DIR_NAME
|
BASE2=$TMP/$NEW_DIR_NAME
|
||||||
@ -345,7 +352,7 @@ set_tarzip_options()
|
|||||||
EXT=".zip"
|
EXT=".zip"
|
||||||
NEED_COMPRESS=0
|
NEED_COMPRESS=0
|
||||||
if [ "$SILENT" = "1" ] ; then
|
if [ "$SILENT" = "1" ] ; then
|
||||||
OPT="-r"
|
OPT="$OPT -q"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -386,9 +393,7 @@ fi
|
|||||||
print_debug "Removing temporary directory"
|
print_debug "Removing temporary directory"
|
||||||
rm -r -f $BASE
|
rm -r -f $BASE
|
||||||
|
|
||||||
|
if [ "$SILENT" = "0" ] ; then
|
||||||
echo "$NEW_NAME$EXT created successfully !!"
|
echo "$NEW_NAME$EXT created successfully !!"
|
||||||
|
fi
|
||||||
# End of script
|
# End of script
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Copyright (C) 1997-2003 MySQL AB
|
||||||
# Copyright (C) 1997-2002 MySQL AB
|
|
||||||
# For a more info consult the file COPYRIGHT distributed with this file
|
# For a more info consult the file COPYRIGHT distributed with this file
|
||||||
|
|
||||||
# This script writes on stdout SQL commands to generate all not
|
# This script writes on stdout SQL commands to generate all not
|
||||||
@ -12,7 +11,7 @@
|
|||||||
# $3 - hostname
|
# $3 - hostname
|
||||||
# $4 - windows option
|
# $4 - windows option
|
||||||
|
|
||||||
if test x$1 = x"" ;
|
if test "$1" = ""
|
||||||
then
|
then
|
||||||
echo "
|
echo "
|
||||||
This script writes on stdout SQL commands to generate all not
|
This script writes on stdout SQL commands to generate all not
|
||||||
@ -20,9 +19,9 @@ existing MySQL system tables. It also replaces the help tables with
|
|||||||
new context from the manual (from fill_help_tables.sql).
|
new context from the manual (from fill_help_tables.sql).
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
mysql_create_system_tables {help|real|verbose} <path to mysql-database directory> <hostname> <windows option>
|
mysql_create_system_tables [test|verbose|real] <path to mysql-database directory> <hostname> <windows option>
|
||||||
";
|
"
|
||||||
exit;
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mdata=$2
|
mdata=$2
|
||||||
@ -44,7 +43,7 @@ i_ht=""
|
|||||||
# Check for old tables
|
# Check for old tables
|
||||||
if test ! -f $mdata/db.frm
|
if test ! -f $mdata/db.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing db table" 1>&2;
|
echo "Preparing db table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -76,7 +75,7 @@ fi
|
|||||||
|
|
||||||
if test ! -f $mdata/host.frm
|
if test ! -f $mdata/host.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing host table" 1>&2;
|
echo "Preparing host table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -102,7 +101,7 @@ fi
|
|||||||
|
|
||||||
if test ! -f $mdata/user.frm
|
if test ! -f $mdata/user.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing user table" 1>&2;
|
echo "Preparing user table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -142,7 +141,7 @@ then
|
|||||||
c_u="$c_u )"
|
c_u="$c_u )"
|
||||||
c_u="$c_u comment='Users and global privileges';"
|
c_u="$c_u comment='Users and global privileges';"
|
||||||
|
|
||||||
if test x$1 = x"test"
|
if test "$1" = "test"
|
||||||
then
|
then
|
||||||
i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
|
i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
|
||||||
INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
|
INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
|
||||||
@ -165,7 +164,7 @@ fi
|
|||||||
|
|
||||||
if test ! -f $mdata/func.frm
|
if test ! -f $mdata/func.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing func table" 1>&2;
|
echo "Preparing func table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -181,7 +180,7 @@ fi
|
|||||||
|
|
||||||
if test ! -f $mdata/tables_priv.frm
|
if test ! -f $mdata/tables_priv.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing tables_priv table" 1>&2;
|
echo "Preparing tables_priv table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -202,7 +201,7 @@ fi
|
|||||||
|
|
||||||
if test ! -f $mdata/columns_priv.frm
|
if test ! -f $mdata/columns_priv.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing columns_priv table" 1>&2;
|
echo "Preparing columns_priv table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -221,7 +220,7 @@ fi
|
|||||||
|
|
||||||
if test ! -f $mdata/help_topic.frm
|
if test ! -f $mdata/help_topic.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing help_topic table" 1>&2;
|
echo "Preparing help_topic table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -242,7 +241,7 @@ old_categories="yes"
|
|||||||
|
|
||||||
if test ! -f $mdata/help_category.frm
|
if test ! -f $mdata/help_category.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing help_category table" 1>&2;
|
echo "Preparing help_category table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -259,7 +258,7 @@ fi
|
|||||||
|
|
||||||
if test ! -f $mdata/help_keyword.frm
|
if test ! -f $mdata/help_keyword.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing help_keyword table" 1>&2;
|
echo "Preparing help_keyword table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -274,7 +273,7 @@ fi
|
|||||||
|
|
||||||
if test ! -f $mdata/help_relation.frm
|
if test ! -f $mdata/help_relation.frm
|
||||||
then
|
then
|
||||||
if test x$1 = x"verbose" ; then
|
if test "$1" = "verbose" ; then
|
||||||
echo "Preparing help_relation table" 1>&2;
|
echo "Preparing help_relation table" 1>&2;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -8,18 +8,8 @@
|
|||||||
# All unrecognized arguments to this script are passed to mysqld.
|
# All unrecognized arguments to this script are passed to mysqld.
|
||||||
|
|
||||||
in_rpm=0
|
in_rpm=0
|
||||||
case "$1" in
|
|
||||||
--rpm)
|
|
||||||
in_rpm="1"; shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
windows=0
|
windows=0
|
||||||
case "$1" in
|
defaults=""
|
||||||
--windows)
|
|
||||||
windows="1"; shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
defaults=
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
|
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
|
||||||
defaults="$1"; shift
|
defaults="$1"; shift
|
||||||
@ -44,6 +34,8 @@ parse_arguments() {
|
|||||||
--ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
|
--ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
|
||||||
--user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
|
--user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
|
||||||
--verbose) verbose=1 ;;
|
--verbose) verbose=1 ;;
|
||||||
|
--rpm) in_rpm=1 ;;
|
||||||
|
--windows) windows=1 ;;
|
||||||
*)
|
*)
|
||||||
if test -n "$pick_args"
|
if test -n "$pick_args"
|
||||||
then
|
then
|
||||||
@ -61,6 +53,9 @@ parse_arguments() {
|
|||||||
if test -x ./bin/my_print_defaults
|
if test -x ./bin/my_print_defaults
|
||||||
then
|
then
|
||||||
print_defaults="./bin/my_print_defaults"
|
print_defaults="./bin/my_print_defaults"
|
||||||
|
elif test -x ./extra/my_print_defaults
|
||||||
|
then
|
||||||
|
print_defaults="./extra/my_print_defaults"
|
||||||
elif test -x @bindir@/my_print_defaults
|
elif test -x @bindir@/my_print_defaults
|
||||||
then
|
then
|
||||||
print_defaults="@bindir@/my_print_defaults"
|
print_defaults="@bindir@/my_print_defaults"
|
||||||
@ -79,6 +74,7 @@ basedir=
|
|||||||
force=0
|
force=0
|
||||||
verbose=0
|
verbose=0
|
||||||
fill_help_tables=""
|
fill_help_tables=""
|
||||||
|
|
||||||
parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
|
parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
|
||||||
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||||
|
|
||||||
@ -103,7 +99,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# find fill_help_tables.sh
|
# find fill_help_tables.sh
|
||||||
for i in $basedir/support-files $basedir/share $basedir/share/mysql $basedir/scripts `pwd` @pkgdatadir@
|
for i in $basedir/support-files $basedir/share $basedir/share/mysql $basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
|
||||||
do
|
do
|
||||||
if test -f $i/fill_help_tables.sql
|
if test -f $i/fill_help_tables.sql
|
||||||
then
|
then
|
||||||
@ -115,22 +111,28 @@ if test -f $pkgdatadir/fill_help_tables.sql
|
|||||||
then
|
then
|
||||||
fill_help_tables=$pkgdatadir/fill_help_tables.sql
|
fill_help_tables=$pkgdatadir/fill_help_tables.sql
|
||||||
else
|
else
|
||||||
if test $verbose -eq 1
|
echo "Could not find help file 'fill_help_tables.sql' in @pkgdatadir@ or inside $basedir".
|
||||||
then
|
exit 1;
|
||||||
echo "Could not find help file 'fill_help_tables.sql' ;$pkgdatadir; ;$basedir;".
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mdata=$ldata/mysql
|
mdata=$ldata/mysql
|
||||||
|
mysqld=$execdir/mysqld
|
||||||
|
mysqld_opt=""
|
||||||
|
|
||||||
if test "$windows" -eq 0 -a ! -x $execdir/mysqld
|
if test "$windows" = 1
|
||||||
|
then
|
||||||
|
mysqld="./sql/mysqld"
|
||||||
|
mysqld_opt="--language=./sql/share/english"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -x $mysqld
|
||||||
then
|
then
|
||||||
if test "$in_rpm" -eq 1
|
if test "$in_rpm" -eq 1
|
||||||
then
|
then
|
||||||
echo "FATAL ERROR $execdir/mysqld not found!"
|
echo "FATAL ERROR $mysqld not found!"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Didn't find $execdir/mysqld"
|
echo "Didn't find $mysqld"
|
||||||
echo "You should do a 'make install' before executing this script"
|
echo "You should do a 'make install' before executing this script"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -184,23 +186,28 @@ else
|
|||||||
create_option="real"
|
create_option="real"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$in_rpm" -eq 0 -a "$windows" -eq 0
|
||||||
|
then
|
||||||
echo "Installing all prepared tables"
|
echo "Installing all prepared tables"
|
||||||
|
fi
|
||||||
if (
|
if (
|
||||||
mysql_create_system_tables $create_option $mdata $hostname $windows
|
$pkgdatadir/mysql_create_system_tables $create_option $mdata $hostname $windows
|
||||||
if test -n "$fill_help_tables"
|
if test -n "$fill_help_tables"
|
||||||
then
|
then
|
||||||
cat $fill_help_tables
|
cat $fill_help_tables
|
||||||
fi
|
fi
|
||||||
) | eval "$execdir/mysqld $defaults --bootstrap --skip-grant-tables \
|
) | eval "$mysqld $defaults $mysqld_opt --bootstrap --skip-grant-tables \
|
||||||
--basedir=$basedir --datadir=$ldata --skip-innodb --skip-bdb $args"
|
--basedir=$basedir --datadir=$ldata --skip-innodb --skip-bdb $args"
|
||||||
then
|
then
|
||||||
echo ""
|
if test "$in_rpm" -eq 0 -a "$windows" -eq 0
|
||||||
if test "$in_rpm" -eq 0 || "$windows" -eq 0
|
|
||||||
then
|
then
|
||||||
|
echo ""
|
||||||
echo "To start mysqld at boot time you have to copy support-files/mysql.server"
|
echo "To start mysqld at boot time you have to copy support-files/mysql.server"
|
||||||
echo "to the right place for your system"
|
echo "to the right place for your system"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
if test "$windows" -eq 0
|
||||||
|
then
|
||||||
echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
|
echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
|
||||||
echo "This is done with:"
|
echo "This is done with:"
|
||||||
echo "$bindir/mysqladmin -u root password 'new-password'"
|
echo "$bindir/mysqladmin -u root password 'new-password'"
|
||||||
@ -216,7 +223,7 @@ then
|
|||||||
echo "able to use the new GRANT command!"
|
echo "able to use the new GRANT command!"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
if test "$in_rpm" -eq 0 -a "$windows" -eq 0
|
if test "$in_rpm" -eq 0
|
||||||
then
|
then
|
||||||
echo "You can start the MySQL daemon with:"
|
echo "You can start the MySQL daemon with:"
|
||||||
echo "cd @prefix@ ; $bindir/mysqld_safe &"
|
echo "cd @prefix@ ; $bindir/mysqld_safe &"
|
||||||
@ -230,13 +237,14 @@ then
|
|||||||
echo "The latest information about MySQL is available on the web at"
|
echo "The latest information about MySQL is available on the web at"
|
||||||
echo "http://www.mysql.com"
|
echo "http://www.mysql.com"
|
||||||
echo "Support MySQL by buying support/licenses at https://order.mysql.com"
|
echo "Support MySQL by buying support/licenses at https://order.mysql.com"
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Installation of grant tables failed!"
|
echo "Installation of grant tables failed!"
|
||||||
echo
|
echo
|
||||||
echo "Examine the logs in $ldata for more information."
|
echo "Examine the logs in $ldata for more information."
|
||||||
echo "You can also try to start the mysqld daemon with:"
|
echo "You can also try to start the mysqld daemon with:"
|
||||||
echo "$execdir/mysqld --skip-grant &"
|
echo "$mysqld --skip-grant &"
|
||||||
echo "You can use the command line tool"
|
echo "You can use the command line tool"
|
||||||
echo "$bindir/mysql to connect to the mysql"
|
echo "$bindir/mysql to connect to the mysql"
|
||||||
echo "database and look at the grant tables:"
|
echo "database and look at the grant tables:"
|
||||||
|
@ -107,7 +107,7 @@ const char *unknown_sqlstate= "HY000";
|
|||||||
const char *not_error_sqlstate= "00000";
|
const char *not_error_sqlstate= "00000";
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
char *shared_memory_base_name= 0;
|
char *shared_memory_base_name= 0;
|
||||||
const char def_shared_memory_base_name= default_shared_memory_base_name;
|
const char *def_shared_memory_base_name= default_shared_memory_base_name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void mysql_close_free_options(MYSQL *mysql);
|
static void mysql_close_free_options(MYSQL *mysql);
|
||||||
|
@ -1652,7 +1652,9 @@ Item_cond::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
|
|||||||
{
|
{
|
||||||
List_iterator<Item> li(list);
|
List_iterator<Item> li(list);
|
||||||
Item *item;
|
Item *item;
|
||||||
|
#ifndef EMBEDDED_LIBRARY
|
||||||
char buff[sizeof(char*)]; // Max local vars in function
|
char buff[sizeof(char*)]; // Max local vars in function
|
||||||
|
#endif
|
||||||
used_tables_cache=0;
|
used_tables_cache=0;
|
||||||
const_item_cache=0;
|
const_item_cache=0;
|
||||||
|
|
||||||
|
@ -3337,15 +3337,19 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
tables[0].table->field[0]->store(user_name->host.str,(uint)
|
tables[0].table->field[0]->store(user_name->host.str,(uint)
|
||||||
user_name->host.length, system_charset_info);
|
user_name->host.length,
|
||||||
|
system_charset_info);
|
||||||
tables[0].table->field[1]->store(user_name->user.str,(uint)
|
tables[0].table->field[1]->store(user_name->user.str,(uint)
|
||||||
user_name->user.length, system_charset_info);
|
user_name->user.length,
|
||||||
|
system_charset_info);
|
||||||
if (!tables[0].table->file->index_read_idx(tables[0].table->record[0],0,
|
if (!tables[0].table->file->index_read_idx(tables[0].table->record[0],0,
|
||||||
(byte*) tables[0].table->field[0]->ptr,0,
|
(byte*) tables[0].table->
|
||||||
|
field[0]->ptr,0,
|
||||||
HA_READ_KEY_EXACT))
|
HA_READ_KEY_EXACT))
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
if ((error = tables[0].table->file->delete_row(tables[0].table->record[0])))
|
if ((error = tables[0].table->file->delete_row(tables[0].table->
|
||||||
|
record[0])))
|
||||||
{
|
{
|
||||||
tables[0].table->file->print_error(error, MYF(0));
|
tables[0].table->file->print_error(error, MYF(0));
|
||||||
tables[0].table->file->index_end();
|
tables[0].table->file->index_end();
|
||||||
@ -3355,7 +3359,7 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list)
|
|||||||
}
|
}
|
||||||
tables[0].table->file->index_end();
|
tables[0].table->file->index_end();
|
||||||
}
|
}
|
||||||
err:
|
|
||||||
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
||||||
rw_unlock(&LOCK_grant);
|
rw_unlock(&LOCK_grant);
|
||||||
close_thread_tables(thd);
|
close_thread_tables(thd);
|
||||||
|
@ -2308,7 +2308,6 @@ mysql_execute_command(THD *thd)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_UPDATE:
|
case SQLCOM_UPDATE:
|
||||||
TABLE_LIST *table;
|
|
||||||
if (check_db_used(thd,tables))
|
if (check_db_used(thd,tables))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -8061,7 +8061,6 @@ void free_underlaid_joins(THD *thd, SELECT_LEX *select)
|
|||||||
bool JOIN::rollup_init()
|
bool JOIN::rollup_init()
|
||||||
{
|
{
|
||||||
uint i,j;
|
uint i,j;
|
||||||
ORDER *group;
|
|
||||||
Item **ref_array;
|
Item **ref_array;
|
||||||
|
|
||||||
tmp_table_param.quick_group= 0; // Can't create groups in tmp table
|
tmp_table_param.quick_group= 0; // Can't create groups in tmp table
|
||||||
@ -8145,7 +8144,7 @@ bool JOIN::rollup_make_fields(List<Item> &all_fields, List<Item> &fields,
|
|||||||
...
|
...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (level=0 ; level < send_group_parts > 0 ; level++)
|
for (level=0 ; level < send_group_parts ; level++)
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
uint pos= send_group_parts - level -1;
|
uint pos= send_group_parts - level -1;
|
||||||
|
@ -3850,7 +3850,7 @@ purge_option:
|
|||||||
}
|
}
|
||||||
Item *tmp= new Item_func_unix_timestamp($2);
|
Item *tmp= new Item_func_unix_timestamp($2);
|
||||||
Lex->sql_command = SQLCOM_PURGE_BEFORE;
|
Lex->sql_command = SQLCOM_PURGE_BEFORE;
|
||||||
Lex->purge_time= tmp->val_int();
|
Lex->purge_time= (ulong) tmp->val_int();
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -1723,13 +1723,13 @@ static int my_uni_utf8 (CHARSET_INFO *cs __attribute__((unused)) ,
|
|||||||
switch (count) {
|
switch (count) {
|
||||||
/* Fall through all cases!!! */
|
/* Fall through all cases!!! */
|
||||||
#ifdef UNICODE_32BIT
|
#ifdef UNICODE_32BIT
|
||||||
case 6: r[5] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x4000000;
|
case 6: r[5] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x4000000;
|
||||||
case 5: r[4] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x200000;
|
case 5: r[4] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x200000;
|
||||||
case 4: r[3] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x10000;
|
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
|
||||||
#endif
|
#endif
|
||||||
case 3: r[2] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x800;
|
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
|
||||||
case 2: r[1] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0xc0;
|
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
|
||||||
case 1: r[0] = wc;
|
case 1: r[0] = (uchar) wc;
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user