Commit 79d87430 authored by unknown's avatar unknown
Browse files

After merge fixes

Remove compiler warnings
Fix some broken tests
Workaround for syncronization bug in NDB (Bug #16445)


client/mysqltest.c:
  Added more information to output from abort_not_supported_test()
  Removed compiler warnings
include/my_sys.h:
  Added function to print names of open files
include/mysys_err.h:
  Print names of open files
mysql-test/include/have_ndb.inc:
  Added comment
mysql-test/lib/mtr_report.pl:
  Only print warning once
mysql-test/r/mysqldump.result:
  After merge fix
mysql-test/r/ndb_basic.result:
  Workaround for syncronization bug in NDB
mysql-test/r/ndb_config.result:
  Remove not portable test
mysql-test/t/ndb_basic.test:
  Workaround for syncronization bug in NDB
mysql-test/t/ndb_config.test:
  Remove not portable test
mysys/errors.c:
  Print names of open files
mysys/my_file.c:
  Ensure that structs are cleared and copyied properly so that my_print_open_files() works.
mysys/my_init.c:
  In case of EXTRA_DEBUG, print names of open files
mysys/my_open.c:
  Added function to print names of open files
sql/sql_table.cc:
  Fixed file-not-closed error
parent 26fe4bf9
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -688,10 +688,11 @@ static void die(const char *fmt, ...)

/* Note that we will get some memory leaks when calling this! */

static void abort_not_supported_test()
static void abort_not_supported_test(const char *fname)
{
  DBUG_ENTER("abort_not_supported_test");
  fprintf(stderr, "This test is not supported by this installation\n");
  fprintf(stderr, "The test '%s' is not supported by this installation\n",
          fname);
  if (!silent)
    printf("skipped\n");
  free_used_memory();
@@ -814,7 +815,7 @@ static void check_result(DYNAMIC_STRING* ds, const char *fname,
  DBUG_ENTER("check_result");

  if (res && require_option)
    abort_not_supported_test();
    abort_not_supported_test(fname);
  switch (res) {
  case RESULT_OK:
    break; /* ok */
@@ -1036,7 +1037,7 @@ int do_wait_for_slave_to_stop(struct st_query *q __attribute__((unused)))
int do_require_manager(struct st_query *query __attribute__((unused)) )
{
  if (!manager)
    abort_not_supported_test();
    abort_not_supported_test("manager");
  return 0;
}

@@ -1305,7 +1306,9 @@ int var_query_set(VAR* var, const char *query, const char** query_end)
    uint i;
    ulong *lengths;
    char *end;
#ifdef NOT_YET
    MYSQL_FIELD *fields= mysql_fetch_fields(res);
#endif

    init_dynamic_string(&result, "", 16384, 65536);
    lengths= mysql_fetch_lengths(res);
@@ -1920,7 +1923,7 @@ static void set_charset(struct st_query *q)
  q->last_argument= p;
  charset_info= get_charset_by_csname(charset_name,MY_CS_PRIMARY,MYF(MY_WME));
  if (!charset_info)
    abort_not_supported_test();
    abort_not_supported_test(charset_name);
}

static uint get_errcodes(match_err *to,struct st_query *q)
@@ -1963,7 +1966,7 @@ static uint get_errcodes(match_err *to,struct st_query *q)
          (as in ER_WRONG_VALUE vs. ER_WRONG_VALUE_COUNT).
        */
	if (!strncmp(start, e->name, (int) (p - start)) &&
            strlen(e->name) == (p - start))
            (uint) strlen(e->name) == (uint) (p - start))
	{
	  to[count].code.errnum= (uint) e->code;
	  to[count].type= ERR_ERRNO;
@@ -4329,7 +4332,7 @@ static void handle_error(const char *query, struct st_query *q,
    if (err_errno == CR_SERVER_LOST ||
        err_errno == CR_SERVER_GONE_ERROR)
      die("require query '%s' failed: %d: %s", query, err_errno, err_error);
    abort_not_supported_test();
    abort_not_supported_test("failed_query");
  }

  if (q->abort_on_error)
@@ -5101,7 +5104,7 @@ static void init_var_hash(MYSQL *mysql)
  DBUG_VOID_RETURN;
}

static void mark_progress(int line)
static void mark_progress(int line __attribute__((unused)))
{
#ifdef NOT_YET
  static FILE* fp = NULL;
+7 −0
Original line number Diff line number Diff line
@@ -558,6 +558,7 @@ extern File my_open(const char *FileName,int Flags,myf MyFlags);
extern File my_register_filename(File fd, const char *FileName,
				 enum file_type type_of_file,
				 uint error_message_number, myf MyFlags);
extern void my_print_open_files(void);
extern File my_create(const char *FileName,int CreateFlags,
		      int AccessFlags, myf MyFlags);
extern int my_close(File Filedes,myf MyFlags);
@@ -647,6 +648,12 @@ extern void allow_break(void);
#define allow_break()
#endif

#ifdef EXTRA_DEBUG
void my_print_open_files();
#else
#define my_print_open_files()
#endif

extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist);
extern char *my_tmpdir(MY_TMPDIR *tmpdir);
extern void free_tmpdir(MY_TMPDIR *tmpdir);
+2 −1
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */
#define EE_SYNC			27
#define EE_UNKNOWN_COLLATION	28
#define EE_FILENOTFOUND		29
#define EE_ERROR_LAST           29 /*Copy last error nr.*/
#define EE_FILE_NOT_CLOSED	30
#define EE_ERROR_LAST           30 /* Copy last error nr */
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */

  /* exit codes for all MySQL programs */
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@ show variables like "have_ndbcluster";
enable_query_log;

# Check that NDB is installed and known to be working
# This will disable ndb from the shell script 'mysql-test-run'

-- require r/have_ndb_status_ok.require
disable_query_log;
eval select "$NDB_STATUS_OK" as ndb_status_ok;
+5 −5
Original line number Diff line number Diff line
@@ -244,6 +244,7 @@ sub mtr_report_stats ($) {
            }
          }
        }
      }
      if ( $found_problems )
      {
	mtr_warning("Got errors/warnings while running tests, please examine",
@@ -251,7 +252,6 @@ sub mtr_report_stats ($) {
      }
    }
  }
  }

  print "\n";

Loading