Commit c2b7fc94 authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.1

parents 4532a89f ec6cbbd8
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ $opt_help= undef;
$opt_log= undef;
$opt_mail= "";
$opt_skip_dmg= undef;
$opt_skip_prefpane= undef;
$opt_skip_si= undef;
$opt_suffix= undef;
$opt_verbose= undef;
@@ -41,6 +42,7 @@ GetOptions(
	"help|h",
	"log|l:s",
	"mail|m=s",
	"skip-prefpane|p",
	"skip-dmg|skip-disk-image|s",
	"skip-si|skip-startup-item",
	"suffix=s",
@@ -82,6 +84,7 @@ $HOST=~ /^([^.-]*)/;
$HOST= $1;
$LOGFILE= "$PWD/Logs/$HOST-$MAJOR.$MINOR$SUFFIX.log";
$BUILDDIR= "$PWD/$HOST";
$PREFPANE= "$PWD/mysql-administrator/source/mac/PreferencePane/build/MySQL.prefPane";
$SRCBASEDIR= <$BUILDDIR/mysql*-$VERSION>;
$SUPFILEDIR= <$SRCBASEDIR/support-files/MacOSX>;
$TAR= <$BUILDDIR/$NAME-apple-darwin*-powerpc.tar.gz>;
@@ -219,6 +222,19 @@ unless ($opt_skip_si)
	&run_command($command, "Error while building package $SI_NAME.pkg!");
}

#
# Include the MySQL Preference Pane
#
unless ($opt_skip_prefpane)
{
	&abort("Could not find PrefPane helper application. Did you compile and install it?")
		unless (-f "$PREFPANE/Contents/Resources/mahelper");
	&logger("Including $PREFPANE in $PKGDEST");
	&run_command("mkdir $PKGDEST/MySQL.prefPane", "Could not create $PKGDEST/MySQL.prefPane!");
	&run_command("ditto $PREFPANE $PKGDEST/MySQL.prefPane", "Could not copy $PREFPANE into $PKGDEST!");
	&run_command("chown -R root:wheel $PKGDEST/MySQL.prefPane", "Cannot chown $PKGDEST/MySQL.prefPane!");
}

if ($opt_skip_dmg)
{
	&logger("SUCCESS: Package $PKGDEST/$NAME.pkg created");
@@ -254,6 +270,7 @@ chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f3 -d" "`) if (!$opt_d
&logger("Copying $PKGDEST/$NAME.pkg to Disk image /Volumes/$NAME");
&run_command("ditto $PKGDEST /Volumes/$NAME", "Could not copy $PKGDEST to /Volumes/$NAME!");
&run_command("ditto $SUPFILEDIR/ReadMe.txt /Volumes/$NAME", "Could not copy $SPFILEDIR/ReadMe.txt to /Volumes/$NAME!");
&run_command("chown root:wheel /Volumes/$NAME/ReadMe.txt", "Could not fix ownerships of /Volumes/$NAME/ReadMe.txt!");
chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f1 -d" "`) if (!$opt_dry_run);
&abort("/Volumes/$NAME not attached!") if (!$mountpoint && !$opt_dry_run);
&logger("Unmounting $mountpoint");
@@ -302,6 +319,7 @@ Options:
                                     if logging is enabled)
                                     Note that the \@-Sign needs to be quoted!
                                     Example: --mail=user\\\@domain.com
-p, --skip-prefpane                  Skip including the PreferencePane
-s, --skip-disk-image, --skip-dmg    Just build the PKGs, don't put it into a
                                     disk image afterwards
    --skip-startup-item, --skip-si   Skip the creation of the StartupItem PKG
+34 −2
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@
#define SHUTDOWN_DEF_TIMEOUT 3600		/* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3

char *host= NULL, *user= 0, *opt_password= 0;
char *host= NULL, *user= 0, *opt_password= 0,
     *default_charset= NULL;
char truncated_var_names[MAX_MYSQL_VAR][MAX_TRUNC_LENGTH];
char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN];
ulonglong last_values[MAX_MYSQL_VAR];
@@ -145,6 +146,9 @@ static struct my_option my_long_options[] =
  {"character-sets-dir", OPT_CHARSETS_DIR,
   "Directory where character sets are.", (gptr*) &charsets_dir,
   (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"default-character-set", OPT_DEFAULT_CHARSET,
   "Set the default character set.", (gptr*) &default_charset,
   (gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
   NO_ARG, 0, 0, 0, 0, 0, 0},
  {"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR,
@@ -343,6 +347,8 @@ int main(int argc,char *argv[])
  if (shared_memory_base_name)
    mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
#endif
  if (default_charset)
    mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
  if (sql_connect(&mysql, option_wait))
  {
    unsigned int err= mysql_errno(&mysql);
@@ -826,13 +832,39 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
      if (argv[1][0])
      {
        char *pw= argv[1];
        bool old= find_type(argv[0], &command_typelib, 2) == ADMIN_OLD_PASSWORD;
#ifdef __WIN__
        uint pw_len= strlen(pw);
        if (pw_len > 1 && pw[0] == '\'' && pw[pw_len-1] == '\'')
          printf("Warning: single quotes were not trimmed from the password by"
                 " your command\nline client, as you might have expected.\n");
#endif
        if (find_type(argv[0], &command_typelib, 2) == ADMIN_OLD_PASSWORD)
        /*
           If we don't already know to use an old-style password, see what
           the server is using
        */
        if (!old) {
          if (mysql_query(mysql, "SHOW VARIABLES LIKE 'old_passwords'")) {
            my_printf_error(0, "Could not determine old_passwords setting from server; error: '%s'",
                	    MYF(ME_BELL),mysql_error(mysql));
            return -1;
          } else {
            MYSQL_RES *res= mysql_store_result(mysql);
            if (!res) {
              my_printf_error(0, "Could not get old_passwords setting from server; error: '%s'",
        		      MYF(ME_BELL),mysql_error(mysql));
              return -1;
            }
            if (!mysql_num_rows(res)) {
              old= 1;
            } else {
              MYSQL_ROW row= mysql_fetch_row(res);
              old= !strncmp(row[1], "ON", 2);
            }
            mysql_free_result(res);
          }
        }
        if (old)
          make_scrambled_password_323(crypted_pw, pw);
        else
          make_scrambled_password(crypted_pw, pw);
+10 −2
Original line number Diff line number Diff line
@@ -106,7 +106,14 @@ FILE *md_result_file;
static char *shared_memory_base_name=0;
#endif
static uint opt_protocol= 0;
static char *default_charset= (char*) MYSQL_UNIVERSAL_CLIENT_CHARSET;
/*
  Constant for detection of default value of default_charset.
  If default_charset is equal to mysql_universal_client_charset, then
  it is the default value which assigned at the very beginning of main().
*/
static const char *mysql_universal_client_charset=
  MYSQL_UNIVERSAL_CLIENT_CHARSET;
static char *default_charset;
static CHARSET_INFO *charset_info= &my_charset_latin1;
const char *default_dbug_option="d:t:o,/tmp/mysqldump.trace";

@@ -678,7 +685,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
        Set charset to the default compiled value if it hasn't
        been reset yet by --default-character-set=xxx.
      */
      if (default_charset == (char*) MYSQL_UNIVERSAL_CLIENT_CHARSET)
      if (default_charset == mysql_universal_client_charset)
        default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
      break;
    }
@@ -2403,6 +2410,7 @@ static char *primary_key_fields(const char *table_name)
int main(int argc, char **argv)
{
  compatible_mode_normal_str[0]= 0;
  default_charset= (char *)mysql_universal_client_charset;

  MY_INIT(argv[0]);
  if (get_options(&argc, &argv))
+3 −2
Original line number Diff line number Diff line
@@ -1924,7 +1924,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
  pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
  realpath rename rint rwlock_init setupterm \
  shmget shmat shmdt shmctl \
  shmget shmat shmdt shmctl sigaction \
  sighold sigset sigthreadmask \
  snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol \
  strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr)
@@ -3097,7 +3097,8 @@ ndb_transporter_opt_objs=""
if test "$ac_cv_func_shmget" = "yes" &&
   test "$ac_cv_func_shmat" = "yes" &&
   test "$ac_cv_func_shmdt" = "yes" &&
   test "$ac_cv_func_shmctl" = "yes"
   test "$ac_cv_func_shmctl" = "yes" &&
   test "$ac_cv_func_sigaction" = "yes"
then
   AC_DEFINE([NDB_SHM_TRANSPORTER], [1],
             [Including Ndb Cluster DB shared memory transporter])
+647 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading