Commit 3cf72be6 authored by kent@mysql.com/kent-amd64.(none)'s avatar kent@mysql.com/kent-amd64.(none)
Browse files

Many files: [Changes done by mleich]

  Fix for
     Bug#35335 funcs_1: Some tests fail within load_file during
                        pushbuild runs
     Solution: 1. Move files with input data used in load_file,
                  load data etc.
                  from suite/funcs_1/<whatever>
                  to std_data
               2. Use for testsuite funcs_1 the server option
                  --secure-file-priv=<MYSQLTEST_VARDIR>
               3. Outfiles have to be stored under MYSQLTEST_VARDIR
  + changes according to WL#4304 Cleanup in funcs_1 tests
    - backport of fixes/improvements made in 5.1 to 5.0
      The differences between scripts in 5.0 and 5.1 cause
      much additional and annoying work during any upmerge.
    - replace error numbers with names
    - improved comments
    - improved formatting
    - Unify storage engine names so that result files for
      storage engine variants do not differ (some tests)
    - remove a script no more used (tests are done in other scripts)
parent edc7090a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ EXTRA_DIST = FINISH.sh \
			compile-alpha-cxx \
			compile-alpha-debug \
			compile-amd64-debug-max \
			compile-amd64-gcov \
			compile-amd64-gprof \
			compile-amd64-max \
			compile-amd64-max-sci \
			compile-darwin-mwcc \
@@ -54,6 +56,8 @@ EXTRA_DIST = FINISH.sh \
			compile-pentium-valgrind-max \
			compile-pentium64-debug \
			compile-pentium64-debug-max \
			compile-pentium64-gcov \
			compile-pentium64-gprof \
			compile-pentium64-max-sci \
			compile-pentium64-valgrind-max \
			compile-ppc \
@@ -61,6 +65,10 @@ EXTRA_DIST = FINISH.sh \
			compile-ppc-debug-max \
			compile-ppc-debug-max-no-ndb \
			compile-ppc-max \
			compile-solaris-amd64 \
			compile-solaris-amd64-debug \
			compile-solaris-amd64-forte \
			compile-solaris-amd64-forte-debug \
			compile-solaris-sparc \
			compile-solaris-sparc-debug \
			compile-solaris-sparc-forte \
+6 −2
Original line number Diff line number Diff line
@@ -45,7 +45,8 @@ dist-hook:
	mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
		$(distdir)/std_data \
		$(distdir)/std_data/ndb_backup50_data_be $(distdir)/std_data/ndb_backup50_data_le \
		$(distdir)/lib
		$(distdir)/lib \
		$(distdir)/funcs_1
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t
	$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
	-$(INSTALL_DATA) $(srcdir)/t/*.imtest $(distdir)/t
@@ -66,6 +67,7 @@ dist-hook:
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50_data_be/BACKUP* $(distdir)/std_data/ndb_backup50_data_be
	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50_data_le/BACKUP* $(distdir)/std_data/ndb_backup50_data_le
	$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(distdir)/std_data/funcs_1
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
	-rm -rf `find $(distdir)/suite -type d -name SCCS`

@@ -77,7 +79,8 @@ install-data-local:
		$(DESTDIR)$(testdir)/std_data \
		$(DESTDIR)$(testdir)/std_data/ndb_backup50_data_be \
		$(DESTDIR)$(testdir)/std_data/ndb_backup50_data_le \
		$(DESTDIR)$(testdir)/lib
		$(DESTDIR)$(testdir)/lib \
		$(DESTDIR)$(testdir)/funcs_1
	$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t
	$(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t
@@ -103,6 +106,7 @@ install-data-local:
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50_data_be/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50_data_be
	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50_data_le/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50_data_le
	$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(DESTDIR)$(testdir)/std_data/funcs_1
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
	for f in `(cd $(srcdir); find suite -type f | grep -v SCCS)`; \
	do \
+2 −2
Original line number Diff line number Diff line
@@ -3739,9 +3739,9 @@ sub mysqld_arguments ($$$$) {
  {
    # By default, prevent the started mysqld to access files outside of vardir
    my $secure_file_dir= $opt_vardir;
    if ( $opt_suite ne "main" )
    if ( $opt_suite ne "main" and $opt_suite ne "funcs_1" )
    {
      # When running a suite other than default allow the mysqld
      # When running a suite other than default or funcs_1 allow the mysqld
      # access to subdirs of mysql-test/ in order to make it possible
      # to "load data" from the suites data/ directory.
      $secure_file_dir= $glob_mysql_test_dir;
+9 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
   SESSION_STATUS
   SESSION_VARIABLES

3. Some hints:
3. Some hints for maintainers of this suite:
   - SHOW TABLES ... LIKE '<pattern>'
     does a case sensitive comparison between the tablename and
     the pattern.
@@ -43,4 +43,12 @@
     ERROR 42000: Access denied for user ... to database 'information_schema'
     DROP DATABASE INFORMATION_SCHEMA;
     ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA'
   - Try to unify results by
     --replace_result $engine_type <engine_to_be_tested>
     if we could expect that the results for storage engine variants of a
     test differ only in the engine names.
     This makes future maintenance easier.
   - Avoid the use of include/show_msg*.inc.
     They produce "SQL" noise which annoys during server debugging and can be
     easy replaced by "--echo ...".
+60 −59
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99
) engine = innodb;


--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb1.txt'
into table tb1;
Loading