mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge with 4.0
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-compile-netware-standard: Delete: netware/BUILD/compile-netware-standard BitKeeper/deleted/.del-mwenv: Delete: netware/BUILD/mwenv BitKeeper/deleted/.del-nwbootstrap: Delete: netware/BUILD/nwbootstrap BitKeeper/deleted/.del-compile-AUTOTOOLS: Delete: netware/BUILD/compile-AUTOTOOLS BitKeeper/deleted/.del-compile-linux-tools: Delete: netware/BUILD/compile-linux-tools BitKeeper/deleted/.del-compile-netware-END: Delete: netware/BUILD/compile-netware-END BitKeeper/deleted/.del-compile-netware-START: Delete: netware/BUILD/compile-netware-START BitKeeper/deleted/.del-compile-netware-all: Delete: netware/BUILD/compile-netware-all BitKeeper/deleted/.del-compile-netware-debug: Delete: netware/BUILD/compile-netware-debug BitKeeper/deleted/.del-mwasmnlm~bc5746809d67feb5: Auto merged BitKeeper/deleted/.del-mwenv~35c8b56062f4b6aa: Auto merged BitKeeper/deleted/.del-mwccnlm~be63afd25a14c3f: Auto merged BitKeeper/deleted/.del-mwldnlm~efb26c57cba3c980: Auto merged BitKeeper/deleted/.del-netware.patch~f70a3a965f54d9ee: Auto merged Docs/internals.texi: Auto merged VC++Files/bdb/bdb.dsp: Auto merged VC++Files/bdb/build_win32/Berkeley_DB.dsw: Auto merged VC++Files/bdb/build_win32/db_archive.dsp: Auto merged VC++Files/bdb/build_win32/db_buildall.dsp: Auto merged VC++Files/bdb/build_win32/db_checkpoint.dsp: Auto merged VC++Files/bdb/build_win32/db_deadlock.dsp: Auto merged VC++Files/bdb/build_win32/db_dll.dsp: Auto merged VC++Files/bdb/build_win32/db_dump.dsp: Auto merged VC++Files/bdb/build_win32/db_java.dsp: Auto merged VC++Files/bdb/build_win32/db_load.dsp: Auto merged VC++Files/bdb/build_win32/db_printlog.dsp: Auto merged VC++Files/bdb/build_win32/db_recover.dsp: Auto merged VC++Files/bdb/build_win32/db_stat.dsp: Auto merged VC++Files/bdb/build_win32/db_static.dsp: Auto merged VC++Files/bdb/build_win32/db_static1.dsp: Auto merged VC++Files/bdb/build_win32/db_tcl.dsp: Auto merged VC++Files/bdb/build_win32/db_test.dsp: Auto merged VC++Files/bdb/build_win32/db_upgrade.dsp: Auto merged VC++Files/bdb/build_win32/db_verify.dsp: Auto merged VC++Files/bdb/build_win32/ex_access.dsp: Auto merged VC++Files/bdb/build_win32/ex_btrec.dsp: Auto merged VC++Files/bdb/build_win32/ex_env.dsp: Auto merged VC++Files/bdb/build_win32/ex_lock.dsp: Auto merged VC++Files/bdb/build_win32/ex_mpool.dsp: Auto merged VC++Files/bdb/build_win32/ex_tpcb.dsp: Auto merged VC++Files/bdb/build_win32/excxx_access.dsp: Auto merged VC++Files/bdb/build_win32/excxx_btrec.dsp: Auto merged VC++Files/bdb/build_win32/excxx_env.dsp: Auto merged VC++Files/bdb/build_win32/excxx_lock.dsp: Auto merged VC++Files/bdb/build_win32/excxx_mpool.dsp: Auto merged VC++Files/bdb/build_win32/excxx_tpcb.dsp: Auto merged VC++Files/client/mysql.dsp: Auto merged VC++Files/client/mysqladmin.dsp: Auto merged VC++Files/client/mysqlcheck.dsp: Auto merged VC++Files/client/mysqlclient.dsp: Auto merged VC++Files/client/mysqlclient.dsw: Auto merged VC++Files/client/mysqldump.dsp: Auto merged VC++Files/client/mysqlimport.dsp: Auto merged VC++Files/client/mysqlshow.dsp: Auto merged VC++Files/comp_err/comp_err.dsp: Auto merged VC++Files/contrib/asm386/zlibvc.dsp: Auto merged VC++Files/contrib/asm386/zlibvc.dsw: Auto merged VC++Files/contrib/minizip/zlibvc.dsp: Auto merged VC++Files/contrib/minizip/zlibvc.dsw: Auto merged VC++Files/dbug/dbug.dsp: Auto merged VC++Files/dbug/dbug.dsw: Auto merged VC++Files/heap/heap.dsp: Auto merged VC++Files/innobase/innobase.dsp: Auto merged VC++Files/isam/isam.dsp: Auto merged VC++Files/isam/isam.dsw: Auto merged VC++Files/isamchk/isamchk.dsp: Auto merged VC++Files/libmysql/libmysql.dsp: Auto merged VC++Files/libmysql/libmysql.dsw: Auto merged VC++Files/libmysqld/examples/test_libmysqld.dsp: Auto merged VC++Files/libmysqld/libmysqld.dsp: Auto merged VC++Files/libmysqltest/myTest.dsp: Auto merged VC++Files/libmysqltest/mytest.dsw: Auto merged VC++Files/merge/merge.dsp: Auto merged VC++Files/merge/merge.dsw: Auto merged VC++Files/my_print_defaults/my_print_defaults.dsp: Auto merged VC++Files/myisam/myisam.dsp: Auto merged VC++Files/myisamchk/myisamchk.dsp: Auto merged VC++Files/myisamlog/myisamlog.dsp: Auto merged VC++Files/myisammrg/myisammrg.dsp: Auto merged VC++Files/mysql.dsp: Auto merged VC++Files/mysql.dsw: Auto merged VC++Files/myisampack/myisampack.dsp: Auto merged VC++Files/mysqlbinlog/mysqlbinlog.dsp: Auto merged VC++Files/mysqlcheck/mysqlcheck.dsp: Auto merged VC++Files/mysqldemb/mysqldemb.dsp: Auto merged VC++Files/mysqlmanager/MySqlManager.dsp: Auto merged VC++Files/mysqlmanager/mysqlmanager.dsw: Auto merged VC++Files/mysqlserver/mysqlserver.dsp: Auto merged VC++Files/mysqlshutdown/myshutdown.dsp: Auto merged VC++Files/mysqlshutdown/mysqlshutdown.dsp: Auto merged VC++Files/mysqlwatch/mysqlwatch.dsp: Auto merged VC++Files/mysys/mysys.dsp: Auto merged VC++Files/mysys/mysys.dsw: Auto merged VC++Files/pack_isam/pack_isam.dsp: Auto merged VC++Files/perror/perror.dsp: Auto merged VC++Files/regex/regex.dsp: Auto merged VC++Files/regex/regex.dsw: Auto merged VC++Files/replace/replace.dsp: Auto merged VC++Files/sql/mysqld.dsw: Auto merged VC++Files/sql/mysqldmax.dsp: Auto merged VC++Files/sql/old/mysqld.dsw: Auto merged VC++Files/strings/MASM6x/strings.dsp: Auto merged VC++Files/strings/MASM6x/strings.dsw: Auto merged VC++Files/strings/backup/strings.dsp: Auto merged VC++Files/strings/backup/strings.dsw: Auto merged VC++Files/strings/noMASM/strings.dsp: Auto merged VC++Files/strings/noMASM/strings.dsw: Auto merged VC++Files/strings/strings.dsw: Auto merged VC++Files/test1/test1.dsp: Auto merged VC++Files/thr_insert_test/thr_insert_test.dsp: Auto merged VC++Files/thr_test/thr_test.dsp: Auto merged VC++Files/vio/vio.dsp: Auto merged VC++Files/zlib/zlib.dsp: Auto merged client/mysqlbinlog.cc: Auto merged client/mysqlshow.c: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged include/myisam.h: Auto merged include/thr_lock.h: Auto merged include/violite.h: Auto merged innobase/buf/buf0buf.c: Auto merged innobase/os/os0file.c: Auto merged innobase/row/row0sel.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/trx/trx0sys.c: Auto merged libmysqld/lib_vio.c: Auto merged myisam/mi_create.c: Auto merged mysql-test/Makefile.am: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/group_by.result: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/join.result: Auto merged mysql-test/r/rpl000001.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/t/auto_increment.test: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/func_like.test: Auto merged mysql-test/t/group_by.test: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/join.test: Auto merged mysql-test/t/type_datetime.test: Auto merged mysql-test/t/type_timestamp.test: Auto merged mysys/default.c: Auto merged mysys/thr_lock.c: Auto merged scripts/make_binary_distribution.sh: Auto merged scripts/mysqld_safe.sh: Auto merged sql/filesort.cc: Auto merged sql/ha_innodb.h: Auto merged sql/ha_myisam.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/lock.cc: Auto merged sql/log.cc: Auto merged sql/log_event.h: Auto merged sql/mf_iocache.cc: Auto merged sql/mysql_priv.h: Auto merged sql/net_serv.cc: Auto merged sql/opt_range.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/repl_failsafe.h: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_analyse.cc: Auto merged sql/sql_base.cc: Auto merged sql-bench/crash-me.sh: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/sql_class.h: Auto merged sql/sql_rename.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_repl.h: Auto merged sql/sql_update.cc: Auto merged sql/stacktrace.c: Auto merged sql/table.cc: Auto merged sql/unireg.h: Auto merged strings/ctype-tis620.c: Auto merged strings/t_ctype.h: Auto merged support-files/mysql.spec.sh: Auto merged tests/grant.res: Auto merged vio/viosocket.c: Auto merged
This commit is contained in:
@ -17,7 +17,7 @@ set -e
|
||||
base_configs=" \
|
||||
--host=i686-pc-netware \
|
||||
--enable-local-infile \
|
||||
--with-extra-charsets=latin1_de \
|
||||
--with-extra-charsets=all \
|
||||
--prefix=N:/mysql \
|
||||
"
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
#! /bin/sh
|
||||
|
||||
# WINE_BUILD_DIR, BUILD_DIR, and VERSION must be correct before compiling
|
||||
# WINE_BUILD_DIR, BUILD_DIR, and VERSION must be changed before compiling
|
||||
# This values are normally changed by the nwbootstrap script
|
||||
|
||||
# the default is "F:/mydev"
|
||||
# the default for WINE_BUILD_DIR is "F:/mydev"
|
||||
export MYDEV="WINE_BUILD_DIR"
|
||||
|
||||
export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/zlib-1.1.4"
|
||||
export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/zlib-1.1.4"
|
||||
export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;libz.a"
|
||||
export MWCNWx86Includes="$MYDEV/libc/include"
|
||||
export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib"
|
||||
export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib"
|
||||
|
||||
export WINEPATH="$MYDEV/mw/bin"
|
||||
|
||||
# the default added path is "$HOME/mydev/mysql-x.x-x/netware/BUILD"
|
||||
# the default for BUILD_DIR is "$HOME/mydev"
|
||||
export PATH="$PATH:BUILD_DIR/mysql-VERSION/netware/BUILD"
|
||||
|
||||
export AR='mwldnlm'
|
||||
|
125
netware/mysql_fix_privilege_tables.pl
Normal file
125
netware/mysql_fix_privilege_tables.pl
Normal file
@ -0,0 +1,125 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
# Copyright (C) 2002 MySQL AB
|
||||
#
|
||||
# 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; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# This notice applies to changes, created by or for Novell, Inc.,
|
||||
# to preexisting works for which notices appear elsewhere in this file.
|
||||
|
||||
# Copyright (c) 2003 Novell, Inc. All Rights Reserved.
|
||||
|
||||
# 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; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use Mysql;
|
||||
|
||||
print "MySQL Fix Privilege Tables Script\n\n";
|
||||
|
||||
print "NOTE: This script updates your privilege tables to the lastest\n";
|
||||
print " specifications!\n\n";
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# get the current root password
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
print "In order to log into MySQL to update it, we'll need the current\n";
|
||||
print "password for the root user. If you've just installed MySQL, and\n";
|
||||
print "you haven't set the root password yet, the password will be blank,\n";
|
||||
print "so you should just press enter here.\n\n";
|
||||
|
||||
print "Enter the current password for root: ";
|
||||
my $password = <STDIN>;
|
||||
chomp $password;
|
||||
print "\n";
|
||||
|
||||
my $conn = Mysql->connect("localhost", "mysql", "root", $password)
|
||||
|| die "Unable to connect to MySQL.";
|
||||
|
||||
print "OK, successfully used the password, moving on...\n\n";
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# MySQL 4.0.2
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
print "Adding new fields used by MySQL 4.0.2 to the privilege tables...\n";
|
||||
print "NOTE: You can ignore any Duplicate column errors.\n";
|
||||
$conn->query(" \
|
||||
ALTER TABLE user \
|
||||
ADD Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER alter_priv, \
|
||||
ADD Super_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Show_db_priv, \
|
||||
ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Super_priv, \
|
||||
ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Create_tmp_table_priv, \
|
||||
ADD Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Lock_tables_priv, \
|
||||
ADD Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Execute_priv, \
|
||||
ADD Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL AFTER Repl_slave_priv; \
|
||||
") && $conn->query(" \
|
||||
UPDATE user SET show_db_priv=select_priv, super_priv=process_priv, execute_priv=process_priv, create_tmp_table_priv='Y', Lock_tables_priv='Y', Repl_slave_priv=file_priv, Repl_client_priv=file_priv where user<>''; \
|
||||
");
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# MySQL 4.0 Limitations
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
print "Adding new fields used by MySQL 4.0 security limitations...\n";
|
||||
|
||||
$conn->query(" \
|
||||
ALTER TABLE user \
|
||||
ADD max_questions int(11) NOT NULL AFTER x509_subject, \
|
||||
ADD max_updates int(11) unsigned NOT NULL AFTER max_questions, \
|
||||
ADD max_connections int(11) unsigned NOT NULL AFTER max_updates; \
|
||||
");
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# MySQL 4.0 DB and Host privs
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
print "Adding new fields used by MySQL 4.0 locking and temporary table security...\n";
|
||||
|
||||
$conn->query(" \
|
||||
ALTER TABLE db \
|
||||
ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, \
|
||||
ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL; \
|
||||
");
|
||||
|
||||
$conn->query(" \
|
||||
ALTER TABLE host \
|
||||
ADD Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, \
|
||||
ADD Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL; \
|
||||
");
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# done
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
print "\n\nAll done!\n\n";
|
||||
|
||||
print "Thanks for using MySQL!\n\n";
|
||||
|
@ -36,6 +36,7 @@
|
||||
******************************************************************************/
|
||||
char autoclose;
|
||||
char basedir[PATH_MAX];
|
||||
char checktables;
|
||||
char datadir[PATH_MAX];
|
||||
char pid_file[PATH_MAX];
|
||||
char address[PATH_MAX];
|
||||
@ -54,6 +55,7 @@ FILE *log_fd = NULL;
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void usage(void);
|
||||
void vlog(char *, va_list);
|
||||
void log(char *, ...);
|
||||
void start_defaults(int, char*[]);
|
||||
@ -74,6 +76,42 @@ void mysql_start(int, char*[]);
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
usage()
|
||||
|
||||
Show usage.
|
||||
|
||||
******************************************************************************/
|
||||
void usage(void)
|
||||
{
|
||||
// keep the screen up
|
||||
setscreenmode(SCR_NO_MODE);
|
||||
|
||||
puts("\
|
||||
\n\
|
||||
usage: mysqld_safe [options]\n\
|
||||
\n\
|
||||
Program to start the MySQL daemon and restart it if it dies unexpectedly.\n\
|
||||
All options, besides those listed below, are passed on to the MySQL daemon.\n\
|
||||
\n\
|
||||
options:\n\
|
||||
\n\
|
||||
--autoclose Automatically close the mysqld_safe screen.\n\
|
||||
\n\
|
||||
--check-tables Check the tables before starting the MySQL daemon.\n\
|
||||
\n\
|
||||
--err-log=<file> Send the MySQL daemon error output to <file>.\n\
|
||||
\n\
|
||||
--help Show this help information.\n\
|
||||
\n\
|
||||
--mysqld=<file> Use the <file> MySQL daemon.\n\
|
||||
\n\
|
||||
");
|
||||
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
vlog()
|
||||
|
||||
Log the message.
|
||||
@ -136,6 +174,9 @@ void start_defaults(int argc, char *argv[])
|
||||
// basedir
|
||||
get_basedir(argv[0], basedir);
|
||||
|
||||
// check-tables
|
||||
checktables = FALSE;
|
||||
|
||||
// hostname
|
||||
if (gethostname(hostname,PATH_MAX) < 0)
|
||||
{
|
||||
@ -279,13 +320,15 @@ void parse_args(int argc, char *argv[])
|
||||
OPT_PORT,
|
||||
OPT_ERR_LOG,
|
||||
OPT_SAFE_LOG,
|
||||
OPT_MYSQLD
|
||||
OPT_MYSQLD,
|
||||
OPT_HELP
|
||||
};
|
||||
|
||||
static struct option options[] =
|
||||
{
|
||||
{"autoclose", no_argument, &autoclose, TRUE},
|
||||
{"basedir", required_argument, 0, OPT_BASEDIR},
|
||||
{"check-tables", no_argument, &checktables, TRUE},
|
||||
{"datadir", required_argument, 0, OPT_DATADIR},
|
||||
{"pid-file", required_argument, 0, OPT_PID_FILE},
|
||||
{"bind-address", required_argument, 0, OPT_BIND_ADDRESS},
|
||||
@ -293,6 +336,7 @@ void parse_args(int argc, char *argv[])
|
||||
{"err-log", required_argument, 0, OPT_ERR_LOG},
|
||||
{"safe-log", required_argument, 0, OPT_SAFE_LOG},
|
||||
{"mysqld", required_argument, 0, OPT_MYSQLD},
|
||||
{"help", no_argument, 0, OPT_HELP},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@ -341,6 +385,10 @@ void parse_args(int argc, char *argv[])
|
||||
strcpy(mysqld, optarg);
|
||||
break;
|
||||
|
||||
case OPT_HELP:
|
||||
usage();
|
||||
break;
|
||||
|
||||
default:
|
||||
// ignore
|
||||
break;
|
||||
@ -563,6 +611,8 @@ void mysql_start(int argc, char *argv[])
|
||||
static char *private_options[] =
|
||||
{
|
||||
"--autoclose",
|
||||
"--check-tables",
|
||||
"--help",
|
||||
"--err-log=",
|
||||
"--mysqld=",
|
||||
NULL
|
||||
@ -594,7 +644,7 @@ void mysql_start(int argc, char *argv[])
|
||||
do
|
||||
{
|
||||
// check the database tables
|
||||
check_tables();
|
||||
if (checktables) check_tables();
|
||||
|
||||
// status
|
||||
time(&cal);
|
||||
|
Reference in New Issue
Block a user