diff options
-rw-r--r-- | .bzrignore | 26 | ||||
-rw-r--r-- | mysql-test/t/temp_table.test | 9 | ||||
-rw-r--r-- | sql/sql_table.cc | 9 | ||||
-rw-r--r-- | support-files/mysql.server.sh | 5 |
4 files changed, 32 insertions, 17 deletions
diff --git a/.bzrignore b/.bzrignore index 0996f3b057b..70ecba34c3a 100644 --- a/.bzrignore +++ b/.bzrignore @@ -73,6 +73,9 @@ Makefile.in' PENDING/* TAGS aclocal.m4 +autom4te-2.53.cache/output.0 +autom4te-2.53.cache/requests +autom4te-2.53.cache/traces.0 autom4te.cache/* autom4te.cache/output.0 autom4te.cache/requests @@ -114,6 +117,9 @@ bdb/build_win32/include.tcl bdb/build_win32/libdb.rc bdb/db/crdel_auto.c bdb/db/db_auto.c +bdb/dist/autom4te-2.53.cache/output.0 +bdb/dist/autom4te-2.53.cache/requests +bdb/dist/autom4te-2.53.cache/traces.0 bdb/dist/autom4te.cache/* bdb/dist/autom4te.cache/output.0 bdb/dist/autom4te.cache/requests @@ -173,6 +179,8 @@ bdb/test/include.tcl bdb/test/logtrack.list bdb/txn/txn_auto.c binary/* +bkpull.log +build.log client/insert_test client/log_event.cc client/log_event.h @@ -199,6 +207,7 @@ config.log config.status configure core +core.2430 db-*.*.* dbug/user.t depcomp @@ -216,6 +225,9 @@ include/my_config.h include/my_global.h include/mysql_version.h include/widec.h +innobase/autom4te-2.53.cache/output.0 +innobase/autom4te-2.53.cache/requests +innobase/autom4te-2.53.cache/traces.0 innobase/autom4te.cache/* innobase/autom4te.cache/output.0 innobase/autom4te.cache/requests @@ -406,6 +418,7 @@ mysys/test_thr_alarm mysys/test_thr_lock mysys/test_vsnprintf mysys/testhash +pull.log regex/re repl-tests/test-repl-ts/repl-timestamp.master.reject repl-tests/test-repl/foo-dump-slave.master. @@ -509,16 +522,3 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl -autom4te-2.53.cache/output.0 -autom4te-2.53.cache/requests -autom4te-2.53.cache/traces.0 -bdb/dist/autom4te-2.53.cache/output.0 -bdb/dist/autom4te-2.53.cache/requests -bdb/dist/autom4te-2.53.cache/traces.0 -bkpull.log -build.log -innobase/autom4te-2.53.cache/output.0 -innobase/autom4te-2.53.cache/requests -innobase/autom4te-2.53.cache/traces.0 -pull.log -core.2430 diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index 10168cf13c7..665e690a322 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -62,6 +62,15 @@ select one.id, two.val, elt(two.val,'one','two') from t1 one, t2 two where two.i drop table t1,t2; # +# Test of failed ALTER TABLE on temporary table +# +create temporary table t1 (a int not null); +insert into t1 values (1),(1); +-- error 1062 +alter table t1 add primary key (a); +drop table t1; + +# # In MySQL 4.0.4 doing a GROUP BY on a NULL column created a disk based # temporary table when a memory based one would be good enough. diff --git a/sql/sql_table.cc b/sql/sql_table.cc index aa0946113c9..266bf8aefa9 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1771,8 +1771,14 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, /* We changed a temporary table */ if (error) { + /* + * The following function call will also free a + * new_table pointer. + * Therefore, here new_table pointer is not free'd as it is + * free'd in close_temporary() which is called by by the + * close_temporary_table() function. + */ close_temporary_table(thd,new_db,tmp_name); - my_free((gptr) new_table,MYF(0)); goto err; } /* Close lock if this is a transactional table */ @@ -2092,7 +2098,6 @@ copy_data_between_tables(TABLE *from,TABLE *to, if (to->file->external_lock(thd,F_UNLCK)) error=1; err: - tmp_error = ha_recovery_logging(thd,TRUE); free_io_cache(from); *copied= found_count; *deleted=delete_count; diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 822e864dd77..d52ade03836 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -79,7 +79,8 @@ parse_arguments() { done } -# Get arguments from the my.cnf file, groups [mysqld] and [mysql_server] +# Get arguments from the my.cnf file, +# groups [mysqld] [mysql_server] and [mysql.server] if test -x ./bin/my_print_defaults then print_defaults="./bin/my_print_defaults" @@ -117,7 +118,7 @@ else test -z "$print_defaults" && print_defaults="my_print_defaults" fi -parse_arguments `$print_defaults $defaults mysqld mysql_server` +parse_arguments `$print_defaults mysqld mysql_server mysql.server` # Safeguard (relative paths, core dumps..) cd $basedir |