Commit 76d43b1e authored by unknown's avatar unknown
Browse files

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

into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1

parents 067568aa 374252c6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -940,3 +940,6 @@ ndbcluster-1186/ndb_3_out.log
ndbcluster-1186/ndbcluster.pid
ndb/tools/ndb_restore
ac_available_languages_fragment
libmysqld/ha_archive.cc
libmysqld/ha_example.cc
libmysqld/ha_tina.cc
+9 −2
Original line number Diff line number Diff line
@@ -825,10 +825,17 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
      }
      if (argv[1][0])
      {
        char *pw= argv[1];
#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)
          make_scrambled_password_323(crypted_pw, argv[1]);
          make_scrambled_password_323(crypted_pw, pw);
        else
          make_scrambled_password(crypted_pw, argv[1]);
          make_scrambled_password(crypted_pw, pw);
      }
      else
	crypted_pw[0]=0;			/* No password */
+7 −0
Original line number Diff line number Diff line
@@ -41,6 +41,13 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
  {
    HP_KEYDEF *keyinfo;
    DBUG_PRINT("info",("Initializing new table"));
    
    /*
      We have to store sometimes byte* del_link in records,
      so the record length should be at least sizeof(byte*)
    */
    set_if_bigger(reclength, sizeof (byte*));
    
    for (i= key_segs= max_length= 0, keyinfo= keydef; i < keys; i++, keyinfo++)
    {
      bzero((char*) &keyinfo->block,sizeof(keyinfo->block));
+3 −1
Original line number Diff line number Diff line
@@ -41,7 +41,9 @@ AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(void*, 4)
AC_CHECK_FUNCS(sched_yield)
AC_CHECK_FUNCS(fdatasync)
#AC_CHECK_FUNCS(localtime_r)	# Already checked by MySQL
AC_CHECK_FUNCS(localtime_r)
#AC_CHECK_FUNCS(readdir_r) MySQL checks that it has also the right args.
# Some versions of Unix only take 2 arguments.
#AC_C_INLINE  Already checked in MySQL
AC_C_BIGENDIAN

+29 −1
Original line number Diff line number Diff line
@@ -711,13 +711,41 @@ dbname.sym can redirect a database directory:
	char*		full_path;
	int		ret;
	struct stat	statinfo;
#ifdef HAVE_READDIR_R
	char		dirent_buf[sizeof(struct dirent) + _POSIX_PATH_MAX +
								100];
			/* In /mysys/my_lib.c, _POSIX_PATH_MAX + 1 is used as
			the max file name len; but in most standards, the
			length is NAME_MAX; we add 100 to be even safer */
#endif

next_file:
	ent = readdir(dir);

#ifdef HAVE_READDIR_R
	ret = readdir_r(dir, (struct dirent*)dirent_buf, &ent);

	if (ret != 0) {
		fprintf(stderr,
"InnoDB: cannot read directory %s, error %lu\n", dirname, (ulong)ret);

		return(-1);
	}

	if (ent == NULL) {
		/* End of directory */
		
		return(1);
	}

	ut_a(strlen(ent->d_name) < _POSIX_PATH_MAX + 100 - 1);
#else
	ent = readdir(dir);

	if (ent == NULL) {

		return(1);
	}
#endif
	ut_a(strlen(ent->d_name) < OS_FILE_MAX_PATH);

	if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
Loading