List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:January 6 2007 1:39am
Subject:bk commit into 5.0 tree (iggy:1.2363)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of iggy. When iggy does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-01-05 07:32:07-05:00, iggy@alf. +6 -0
  WL#3670: Compile-time option to remove GRANT-related startup options
  - Windows and posix configure scripts now accept a command line option
  to disable the use of init-file and skip-grant-tables command line
  mysql server options.

  configure.in@stripped, 2007-01-05 07:32:02-05:00, iggy@alf. +16 -0
    WL#3670: Compile-time option to remove GRANT-related startup options
    - Add new command line option for configure script.

  myisam/mi_packrec.c@stripped, 2007-01-05 07:32:03-05:00, iggy@alf. +1 -1
    WL#3670: Compile-time option to remove GRANT-related startup options
    - All DBUG_ENTER statements must come before variable assignment 
    statements otherwise Windows debug and Netware builds will not be fun.

  sql/CMakeLists.txt@stripped, 2007-01-05 07:32:03-05:00, iggy@alf. +4 -0
    WL#3670: Compile-time option to remove GRANT-related startup options
    - Add definition for new command line option.

  sql/mysqld.cc@stripped, 2007-01-05 07:32:03-05:00, iggy@alf. +4 -0
    WL#3670: Compile-time option to remove GRANT-related startup options
    - Remove --init-file and --skip-grant-tables command line options from
    mysql server if new option is defined.

  win/README@stripped, 2007-01-05 07:32:04-05:00, iggy@alf. +3 -0
    WL#3670: Compile-time option to remove GRANT-related startup options
    - Add help for new command line option.

  win/configure.js@stripped, 2007-01-05 07:32:04-05:00, iggy@alf. +1 -0
    WL#3670: Compile-time option to remove GRANT-related startup options
    - Define new configure.js command line option.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	iggy
# Host:	alf.
# Root:	D:/src/mysql-5.0-maint_wl3670

--- 1.413/configure.in	2007-01-05 07:32:17 -05:00
+++ 1.414/configure.in	2007-01-05 07:32:17 -05:00
@@ -713,6 +713,22 @@
   AC_MSG_RESULT([no])
 fi
 
+# If we should allow init-file and skip-grant-table options
+AC_MSG_CHECKING(If we should should enable init-file and skip-grant-table options)
+AC_ARG_ENABLE(grant-options,
+    [  --disable-grant-options Disables the use of --init-file and --skip-grant-tables
options],
+    [ DISABLE_GRANT_OPTIONS=$enableval ],
+    [ DISABLE_GRANT_OPTIONS=no ]
+    )
+if test "$DISABLE_GRANT_OPTIONS" = "yes"
+then
+  AC_MSG_RESULT([yes])
+  AC_DEFINE([DISABLE_GRANT_OPTIONS], [1],
+            [Disables the use of --init-file and --skip-grant-tables options])
+else
+  AC_MSG_RESULT([no])
+fi
+
 MYSQL_SYS_LARGEFILE
 
 # Types that must be checked AFTER large file support is checked

--- 1.38/myisam/mi_packrec.c	2007-01-05 07:32:17 -05:00
+++ 1.39/myisam/mi_packrec.c	2007-01-05 07:32:17 -05:00
@@ -592,8 +592,8 @@
 			      uint16 *decode_table)
 {
   uint prev_offset;
-  prev_offset= offset;
   DBUG_ENTER("copy_decode_table");
+  prev_offset= offset;
 
   /* Descent on the left side. */
   if (!(*decode_table & IS_CHAR))

--- 1.584/sql/mysqld.cc	2007-01-05 07:32:17 -05:00
+++ 1.585/sql/mysqld.cc	2007-01-05 07:32:17 -05:00
@@ -4891,9 +4891,11 @@
   {"init-connect", OPT_INIT_CONNECT, "Command(s) that are executed for each new
connection",
    (gptr*) &opt_init_connect, (gptr*) &opt_init_connect, 0, GET_STR_ALLOC,
    REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+#ifndef DISABLE_GRANT_OPTIONS
   {"init-file", OPT_INIT_FILE, "Read SQL commands from this file at startup.",
    (gptr*) &opt_init_file, (gptr*) &opt_init_file, 0, GET_STR, REQUIRED_ARG,
    0, 0, 0, 0, 0, 0},
+#endif
   {"init-rpl-role", OPT_INIT_RPL_ROLE, "Set the replication role.", 0, 0, 0,
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"init-slave", OPT_INIT_SLAVE, "Command(s) that are executed when a slave connects to
this master",
@@ -5348,10 +5350,12 @@
    "Show user and password in SHOW SLAVE HOSTS on this master",
    (gptr*) &opt_show_slave_auth_info, (gptr*) &opt_show_slave_auth_info, 0,
    GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+#ifndef DISABLE_GRANT_OPTIONS
   {"skip-grant-tables", OPT_SKIP_GRANT,
    "Start without grant tables. This gives all users FULL ACCESS to all tables!",
    (gptr*) &opt_noacl, (gptr*) &opt_noacl, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
    0},
+#endif
   {"skip-host-cache", OPT_SKIP_HOST_CACHE, "Don't cache host names.", 0, 0, 0,
    GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"skip-locking", OPT_SKIP_LOCK,

--- 1.2/sql/CMakeLists.txt	2007-01-05 07:32:17 -05:00
+++ 1.3/sql/CMakeLists.txt	2007-01-05 07:32:17 -05:00
@@ -25,6 +25,10 @@
 
 ADD_DEFINITIONS(-DHAVE_INNOBASE -DMYSQL_SERVER 
                 -D_CONSOLE -DHAVE_DLOPEN)
+                
+IF(DISABLE_GRANT_OPTIONS)                
+  ADD_DEFINITIONS(-DDISABLE_GRANT_OPTIONS)
+ENDIF(DISABLE_GRANT_OPTIONS)
 
 ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
                discover.cc ../libmysql/errmsg.c field.cc field_conv.cc 

--- 1.1/win/README	2007-01-05 07:32:17 -05:00
+++ 1.2/win/README	2007-01-05 07:32:17 -05:00
@@ -49,6 +49,9 @@
     COMPILATION_COMMENT=<comment>        Server comment, default "Source
distribution"
     MYSQL_TCP_PORT=<port>                Server port, default 3306
     CYBOZU
+    DISABLE_GRANT_OPTIONS                Disables the use of --init-file and
--skip-grant-tables
+                                         options of mysqld.exe
+                                
 
 So the command line could look like:
 

--- 1.1/win/configure.js	2007-01-05 07:32:17 -05:00
+++ 1.2/win/configure.js	2007-01-05 07:32:17 -05:00
@@ -32,6 +32,7 @@
             case "WITH_PARTITION_STORAGE_ENGINE":
             case "__NT__":
             case "CYBOZU":
+            case "DISABLE_GRANT_OPTIONS":
                     configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
                     break;
             case "MYSQL_SERVER_SUFFIX":
Thread
bk commit into 5.0 tree (iggy:1.2363)Ignacio Galarza6 Jan