Commit b96e4b68 authored by unknown's avatar unknown

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

into  mysql.com:/home/stewart/Documents/MySQL/4.1/main

parents 80b98425 3dd066e8
...@@ -659,11 +659,6 @@ sub command_line_setup () { ...@@ -659,11 +659,6 @@ sub command_line_setup () {
mtr_error("Coverage test needs the source - please use source dist"); 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 ) if ( $opt_gdb )
{ {
$opt_wait_timeout= 300; $opt_wait_timeout= 300;
...@@ -853,7 +848,7 @@ sub executable_setup () { ...@@ -853,7 +848,7 @@ sub executable_setup () {
if ( $glob_use_embedded_server ) if ( $glob_use_embedded_server )
{ {
my $path_examples= "$glob_basedir/libmysqld/examples"; 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= $exe_mysql_client_test=
mtr_exe_exists("$path_examples/mysql_client_test_embedded", mtr_exe_exists("$path_examples/mysql_client_test_embedded",
"/usr/bin/false"); "/usr/bin/false");
...@@ -878,7 +873,6 @@ sub executable_setup () { ...@@ -878,7 +873,6 @@ sub executable_setup () {
else else
{ {
$path_client_bindir= mtr_path_exists("$glob_basedir/bin"); $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_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
$exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow"); $exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog"); $exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
......
...@@ -652,30 +652,30 @@ create table t3 engine=merge union=(t1, t2) select * from t2; ...@@ -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 ERROR HY000: You can't specify target table 't2' for update in FROM clause
drop table t1, t2; drop table t1, t2;
create table t1 ( create table t1 (
a double(16,6), a double(14,4),
b varchar(10), b varchar(10),
index (a,b) index (a,b)
) engine=merge union=(t2,t3); ) engine=merge union=(t2,t3);
create table t2 ( create table t2 (
a double(16,6), a double(14,4),
b varchar(10), b varchar(10),
index (a,b) index (a,b)
) engine=myisam; ) engine=myisam;
create table t3 ( create table t3 (
a double(16,6), a double(14,4),
b varchar(10), b varchar(10),
index (a,b) index (a,b)
) engine=myisam; ) engine=myisam;
insert into t2 values ( null, ''); insert into t2 values ( null, '');
insert into t2 values ( 9999999999.999999, ''); insert into t2 values ( 9999999999.999, '');
insert into t3 select * from t2; insert into t3 select * from t2;
select min(a), max(a) from t1; select min(a), max(a) from t1;
min(a) max(a) min(a) max(a)
9999999999.999998 9999999999.999998 9999999999.9990 9999999999.9990
flush tables; flush tables;
select min(a), max(a) from t1; select min(a), max(a) from t1;
min(a) max(a) min(a) max(a)
9999999999.999998 9999999999.999998 9999999999.9990 9999999999.9990
drop table t1, t2, t3; drop table t1, t2, t3;
create table t1 (a int,b int,c int, index (a,b,c)); 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)); create table t2 (a int,b int,c int, index (a,b,c));
......
...@@ -65,7 +65,7 @@ sql_mode NO_FIELD_OPTIONS,MYSQL323,MYSQL40 ...@@ -65,7 +65,7 @@ sql_mode NO_FIELD_OPTIONS,MYSQL323,MYSQL40
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL auto_increment, `a` int(11) NOT NULL,
`pseudo` varchar(35) NOT NULL default '', `pseudo` varchar(35) NOT NULL default '',
`email` varchar(60) NOT NULL default '', `email` varchar(60) NOT NULL default '',
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
...@@ -79,8 +79,8 @@ show create table t1; ...@@ -79,8 +79,8 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE "t1" ( t1 CREATE TABLE "t1" (
"a" int(11) NOT NULL, "a" int(11) NOT NULL,
"pseudo" varchar(35) NOT NULL default '', "pseudo" varchar(35) character set latin2 NOT NULL default '',
"email" varchar(60) NOT NULL default '', "email" varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY ("a"), PRIMARY KEY ("a"),
UNIQUE KEY "email" ("email") UNIQUE KEY "email" ("email")
) )
...@@ -140,3 +140,23 @@ t1 CREATE TABLE `t1` ( ...@@ -140,3 +140,23 @@ t1 CREATE TABLE `t1` (
drop table t1 ; drop table t1 ;
set @@SQL_MODE=NULL; set @@SQL_MODE=NULL;
ERROR 42000: Variable 'sql_mode' can't be set to the value of '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;
...@@ -294,29 +294,25 @@ drop table t1, t2; ...@@ -294,29 +294,25 @@ drop table t1, t2;
# non-debug build. But there is no guarantee that this will be always so. # non-debug build. But there is no guarantee that this will be always so.
# #
create table t1 ( create table t1 (
a double(16,6), a double(14,4),
b varchar(10), b varchar(10),
index (a,b) index (a,b)
) engine=merge union=(t2,t3); ) engine=merge union=(t2,t3);
create table t2 ( create table t2 (
a double(16,6), a double(14,4),
b varchar(10), b varchar(10),
index (a,b) index (a,b)
) engine=myisam; ) engine=myisam;
create table t3 ( create table t3 (
a double(16,6), a double(14,4),
b varchar(10), b varchar(10),
index (a,b) index (a,b)
) engine=myisam; ) engine=myisam;
insert into t2 values ( null, ''); insert into t2 values ( null, '');
# We may have insufficient accuracy for 16 digits of '9'. insert into t2 values ( 9999999999.999, '');
# Suppress a "truncate" warning due to accuracy problems.
--disable_warnings
insert into t2 values ( 9999999999.999999, '');
--enable_warnings
insert into t3 select * from t2; insert into t3 select * from t2;
select min(a), max(a) from t1; select min(a), max(a) from t1;
flush tables; flush tables;
......
...@@ -138,7 +138,7 @@ drop table t1; ...@@ -138,7 +138,7 @@ drop table t1;
--exec $MYSQL_DUMP --skip-comments --databases test --exec $MYSQL_DUMP --skip-comments --databases test
create database mysqldump_test_db character set latin2 collate latin2_bin; 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; drop database mysqldump_test_db;
# #
......
...@@ -86,4 +86,16 @@ drop table t1 ; ...@@ -86,4 +86,16 @@ drop table t1 ;
--error 1231 --error 1231
set @@SQL_MODE=NULL; 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 # End of 4.1 tests
...@@ -1299,7 +1299,8 @@ store_create_info(THD *thd, TABLE *table, String *packet) ...@@ -1299,7 +1299,8 @@ store_create_info(THD *thd, TABLE *table, String *packet)
field->sql_type(type); field->sql_type(type);
packet->append(type.ptr(), type.length(), system_charset_info); 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) if (field->charset() != table->table_charset)
{ {
...@@ -1337,7 +1338,7 @@ store_create_info(THD *thd, TABLE *table, String *packet) ...@@ -1337,7 +1338,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
has_default= (field->type() != FIELD_TYPE_BLOB && has_default= (field->type() != FIELD_TYPE_BLOB &&
field->unireg_check != Field::NEXT_NUMBER && field->unireg_check != Field::NEXT_NUMBER &&
!((foreign_db_mode || limited_mysql_mode) && !((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40)) &&
has_now_default)); has_now_default));
if (has_default) if (has_default)
...@@ -1367,12 +1368,13 @@ store_create_info(THD *thd, TABLE *table, String *packet) ...@@ -1367,12 +1368,13 @@ store_create_info(THD *thd, TABLE *table, String *packet)
packet->append(tmp); packet->append(tmp);
} }
if (!foreign_db_mode && !limited_mysql_mode && if (!(thd->variables.sql_mode & MODE_NO_FIELD_OPTIONS) &&
table->timestamp_field == field && table->timestamp_field == field &&
field->unireg_check != Field::TIMESTAMP_DN_FIELD) field->unireg_check != Field::TIMESTAMP_DN_FIELD)
packet->append(" on update CURRENT_TIMESTAMP",28); 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 ); packet->append(" auto_increment", 15 );
if (field->comment.length) if (field->comment.length)
......
...@@ -501,7 +501,7 @@ fi ...@@ -501,7 +501,7 @@ fi
# Clean up the BuildRoot # Clean up the BuildRoot
%clean %clean
[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR; [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
%files server %files server
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
...@@ -668,6 +668,11 @@ fi ...@@ -668,6 +668,11 @@ fi
# itself - note that they must be ordered by date (important when # itself - note that they must be ordered by date (important when
# merging BK trees) # merging BK trees)
%changelog %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> * Thu Aug 04 2005 Lenz Grimmer <lenz@mysql.com>
- Fixed the creation of the mysql user group account in the postinstall - Fixed the creation of the mysql user group account in the postinstall
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment