diff options
author | unknown <stewart@mysql.com> | 2005-09-30 14:34:53 +1000 |
---|---|---|
committer | unknown <stewart@mysql.com> | 2005-09-30 14:34:53 +1000 |
commit | b96e4b683c944d3cc40976d83fe9ce7375c891a0 (patch) | |
tree | 705adea9a0b892531d148dcc67b08388e3f984fa | |
parent | 80b9842557aa496be6f15a34a0166bbd02afbe09 (diff) | |
parent | 3dd066e8430b64380fc6d20041f3cc6ee329c286 (diff) | |
download | mariadb-git-b96e4b683c944d3cc40976d83fe9ce7375c891a0.tar.gz |
Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/stewart/Documents/MySQL/4.1/main
-rw-r--r-- | mysql-test/lib/mtr_report.pl | 4 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 8 | ||||
-rw-r--r-- | mysql-test/r/merge.result | 12 | ||||
-rw-r--r-- | mysql-test/r/sql_mode.result | 26 | ||||
-rw-r--r-- | mysql-test/t/merge.test | 12 | ||||
-rw-r--r-- | mysql-test/t/mysqldump.test | 2 | ||||
-rw-r--r-- | mysql-test/t/sql_mode.test | 12 | ||||
-rw-r--r-- | sql/sql_show.cc | 10 | ||||
-rw-r--r-- | support-files/mysql.spec.sh | 7 |
9 files changed, 61 insertions, 32 deletions
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 9002f204602..515988ee5c7 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -257,11 +257,11 @@ sub mtr_print_header () { print "\n"; if ( $::opt_timer ) { - print "TEST RESULT TIME (ms)\n"; + print "TEST RESULT TIME (ms)\n"; } else { - print "TEST RESULT\n"; + print "TEST RESULT\n"; } mtr_print_line(); print "\n"; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index be0c9b66f71..4b055e0bb84 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -659,11 +659,6 @@ sub command_line_setup () { mtr_error("Coverage test needs the source - please use source dist"); } - if ( $glob_use_embedded_server and ! $opt_source_dist ) - { - mtr_error("Embedded server needs source tree - please use source dist"); - } - if ( $opt_gdb ) { $opt_wait_timeout= 300; @@ -853,7 +848,7 @@ sub executable_setup () { if ( $glob_use_embedded_server ) { my $path_examples= "$glob_basedir/libmysqld/examples"; - $exe_mysqltest= mtr_exe_exists("$path_examples/mysqltest"); + $exe_mysqltest= mtr_exe_exists("$path_examples/mysqltest_embedded"); $exe_mysql_client_test= mtr_exe_exists("$path_examples/mysql_client_test_embedded", "/usr/bin/false"); @@ -878,7 +873,6 @@ sub executable_setup () { else { $path_client_bindir= mtr_path_exists("$glob_basedir/bin"); - $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); $exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump"); $exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow"); $exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog"); diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 0f055031572..3035908688a 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -652,30 +652,30 @@ create table t3 engine=merge union=(t1, t2) select * from t2; ERROR HY000: You can't specify target table 't2' for update in FROM clause drop table t1, t2; create table t1 ( -a double(16,6), +a double(14,4), b varchar(10), index (a,b) ) engine=merge union=(t2,t3); create table t2 ( -a double(16,6), +a double(14,4), b varchar(10), index (a,b) ) engine=myisam; create table t3 ( -a double(16,6), +a double(14,4), b varchar(10), index (a,b) ) engine=myisam; insert into t2 values ( null, ''); -insert into t2 values ( 9999999999.999999, ''); +insert into t2 values ( 9999999999.999, ''); insert into t3 select * from t2; select min(a), max(a) from t1; min(a) max(a) -9999999999.999998 9999999999.999998 +9999999999.9990 9999999999.9990 flush tables; select min(a), max(a) from t1; min(a) max(a) -9999999999.999998 9999999999.999998 +9999999999.9990 9999999999.9990 drop table t1, t2, t3; create table t1 (a int,b int,c int, index (a,b,c)); create table t2 (a int,b int,c int, index (a,b,c)); diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 4e1693e15ec..d459b6acf6d 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -65,7 +65,7 @@ sql_mode NO_FIELD_OPTIONS,MYSQL323,MYSQL40 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL auto_increment, + `a` int(11) NOT NULL, `pseudo` varchar(35) NOT NULL default '', `email` varchar(60) NOT NULL default '', PRIMARY KEY (`a`), @@ -79,8 +79,8 @@ show create table t1; Table Create Table t1 CREATE TABLE "t1" ( "a" int(11) NOT NULL, - "pseudo" varchar(35) NOT NULL default '', - "email" varchar(60) NOT NULL default '', + "pseudo" varchar(35) character set latin2 NOT NULL default '', + "email" varchar(60) character set latin2 NOT NULL default '', PRIMARY KEY ("a"), UNIQUE KEY "email" ("email") ) @@ -140,3 +140,23 @@ t1 CREATE TABLE `t1` ( drop table t1 ; set @@SQL_MODE=NULL; ERROR 42000: Variable 'sql_mode' can't be set to the value of 'NULL' +set session sql_mode=ansi; +create table t1 +(f1 integer auto_increment primary key, +f2 timestamp default current_timestamp on update current_timestamp); +show create table t1; +Table Create Table +t1 CREATE TABLE "t1" ( + "f1" int(11) NOT NULL auto_increment, + "f2" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY ("f1") +) +set session sql_mode=no_field_options; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) NOT NULL, + `f2` timestamp NOT NULL default CURRENT_TIMESTAMP, + PRIMARY KEY (`f1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 347a76c3991..d384c017611 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -294,29 +294,25 @@ drop table t1, t2; # non-debug build. But there is no guarantee that this will be always so. # create table t1 ( - a double(16,6), + a double(14,4), b varchar(10), index (a,b) ) engine=merge union=(t2,t3); create table t2 ( - a double(16,6), + a double(14,4), b varchar(10), index (a,b) ) engine=myisam; create table t3 ( - a double(16,6), + a double(14,4), b varchar(10), index (a,b) ) engine=myisam; insert into t2 values ( null, ''); -# We may have insufficient accuracy for 16 digits of '9'. -# Suppress a "truncate" warning due to accuracy problems. ---disable_warnings -insert into t2 values ( 9999999999.999999, ''); ---enable_warnings +insert into t2 values ( 9999999999.999, ''); insert into t3 select * from t2; select min(a), max(a) from t1; flush tables; diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index f2d56eed151..4978da0bd67 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -138,7 +138,7 @@ drop table t1; --exec $MYSQL_DUMP --skip-comments --databases test create database mysqldump_test_db character set latin2 collate latin2_bin; ---exec $MYSQL_DUMP --skip-comments --databases mysqldump_test_db; +--exec $MYSQL_DUMP --skip-comments --databases mysqldump_test_db drop database mysqldump_test_db; # diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test index 4a5a136f54a..7877f9acc40 100644 --- a/mysql-test/t/sql_mode.test +++ b/mysql-test/t/sql_mode.test @@ -86,4 +86,16 @@ drop table t1 ; --error 1231 set @@SQL_MODE=NULL; +# +# Bug #797: in sql_mode=ANSI, show create table ignores auto_increment +# +set session sql_mode=ansi; +create table t1 +(f1 integer auto_increment primary key, + f2 timestamp default current_timestamp on update current_timestamp); +show create table t1; +set session sql_mode=no_field_options; +show create table t1; +drop table t1; + # End of 4.1 tests diff --git a/sql/sql_show.cc b/sql/sql_show.cc index c3c28535954..e619b148f3a 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1299,7 +1299,8 @@ store_create_info(THD *thd, TABLE *table, String *packet) field->sql_type(type); packet->append(type.ptr(), type.length(), system_charset_info); - if (field->has_charset() && !limited_mysql_mode && !foreign_db_mode) + if (field->has_charset() && + !(thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40))) { if (field->charset() != table->table_charset) { @@ -1337,7 +1338,7 @@ store_create_info(THD *thd, TABLE *table, String *packet) has_default= (field->type() != FIELD_TYPE_BLOB && field->unireg_check != Field::NEXT_NUMBER && - !((foreign_db_mode || limited_mysql_mode) && + !((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)) && has_now_default)); if (has_default) @@ -1367,12 +1368,13 @@ store_create_info(THD *thd, TABLE *table, String *packet) packet->append(tmp); } - if (!foreign_db_mode && !limited_mysql_mode && + if (!(thd->variables.sql_mode & MODE_NO_FIELD_OPTIONS) && table->timestamp_field == field && field->unireg_check != Field::TIMESTAMP_DN_FIELD) packet->append(" on update CURRENT_TIMESTAMP",28); - if (field->unireg_check == Field::NEXT_NUMBER && !foreign_db_mode) + if (field->unireg_check == Field::NEXT_NUMBER && + !(thd->variables.sql_mode & MODE_NO_FIELD_OPTIONS)) packet->append(" auto_increment", 15 ); if (field->comment.length) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index af9abd2fce1..0f597e1dda5 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -501,7 +501,7 @@ fi # Clean up the BuildRoot %clean -[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR; +[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; %files server %defattr(-,root,root,0755) @@ -668,6 +668,11 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Thu Sep 29 2005 Lenz Grimmer <lenz@mysql.com> + +- fixed the removing of the RPM_BUILD_ROOT in the %clean section (the + $RBR variable did not get expanded, thus leaving old build roots behind) + * Thu Aug 04 2005 Lenz Grimmer <lenz@mysql.com> - Fixed the creation of the mysql user group account in the postinstall |