Commit 26d07cd0 authored by unknown's avatar unknown
Browse files

Merge bk-internal:/home/bk/mysql-5.0

into  mysql.com:/home/jimw/my/mysql-5.0-clean

parents b1195383 ae450d8a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2446,7 +2446,7 @@ thread_dirs=

dnl This probably should be cleaned up more - for now the threaded
dnl client is just using plain-old libs.
sql_client_dirs="libmysql strings regex client"
sql_client_dirs="strings regex mysys sql/share libmysql client"
linked_client_targets="linked_libmysql_sources"

if test "$THREAD_SAFE_CLIENT" != "no"
@@ -2484,7 +2484,7 @@ then
  AC_DEFINE([THREAD], [1],
            [Define if you want to have threaded code. This may be undef on client code])
  # Avoid _PROGRAMS names
  THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o"
  THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o mf_keycache.o"
  AC_SUBST(THREAD_LOBJECTS)
  server_scripts="mysqld_safe mysql_install_db"
  sql_server_dirs="strings mysys dbug extra regex"
@@ -2595,7 +2595,6 @@ esac
  # END of configuration for optional table handlers
  #
  sql_server_dirs="$sql_server_dirs myisam myisammrg heap vio sql"

fi

# IMPORTANT - do not modify LIBS past this line - this hack is the only way
+2 −0
Original line number Diff line number Diff line
@@ -18,7 +18,9 @@ char *argv[];
#if defined(HAVE_PTHREAD_INIT) && defined(THREAD)
  pthread_init();			/* Must be called before DBUG_ENTER */
#endif
#ifdef THREAD
  my_thread_global_init();
#endif
  {
    DBUG_ENTER ("main");
    DBUG_PROCESS (argv[0]);
+40 −0
Original line number Diff line number Diff line
@@ -720,3 +720,43 @@ Warning 1292 Truncated incorrect datetime value: '2005-01-00'
select time_format('100:00:00', '%H %k %h %I %l');
time_format('100:00:00', '%H %k %h %I %l')
100 100 04 04 4
create table t1 (a timestamp default '2005-05-05 01:01:01',
b timestamp default '2005-05-05 01:01:01');
create function t_slow_sysdate() returns timestamp
begin
do sleep(2);
return sysdate();
end;
//
insert into t1 set a = sysdate(), b = t_slow_sysdate();//
create trigger t_before before insert on t1
for each row begin
set new.b = t_slow_sysdate();
end
//
insert into t1 set a = sysdate();
select a != b from t1;
a != b
1
1
drop trigger t_before;
drop function t_slow_sysdate;
drop table t1;
create table t1 (a datetime, i int, b datetime);
insert into t1 select sysdate(), sleep(1), sysdate() from dual;
select a != b from t1;
a != b
1
drop table t1;
create procedure t_sysdate()
begin
select sysdate() into @a;
do sleep(2);
select sysdate() into @b;
select @a != @b;
end;
//
call t_sysdate();
@a != @b
1
drop procedure t_sysdate;
+52 −0
Original line number Diff line number Diff line
@@ -353,3 +353,55 @@ select last_day('2005-01-00');
# the 0-11 range
#
select time_format('100:00:00', '%H %k %h %I %l');

#
# Bug #12562: Make SYSDATE behave like it does in Oracle: always the current
#             time, regardless of magic to make NOW() always the same for the
#             entirety of a statement.
create table t1 (a timestamp default '2005-05-05 01:01:01',
                 b timestamp default '2005-05-05 01:01:01');
delimiter //;
create function t_slow_sysdate() returns timestamp
begin
  do sleep(2);
  return sysdate();
end;
//

insert into t1 set a = sysdate(), b = t_slow_sysdate();//

create trigger t_before before insert on t1
for each row begin
  set new.b = t_slow_sysdate();
end
//

delimiter ;//

insert into t1 set a = sysdate();

select a != b from t1;

drop trigger t_before;
drop function t_slow_sysdate;
drop table t1;

create table t1 (a datetime, i int, b datetime);
insert into t1 select sysdate(), sleep(1), sysdate() from dual;
select a != b from t1;
drop table t1;

delimiter //;
create procedure t_sysdate()
begin
  select sysdate() into @a;
  do sleep(2);
  select sysdate() into @b;
  select @a != @b;
end;
//
delimiter ;//
call t_sysdate();
drop procedure t_sysdate;

# End of 5.0 tests
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
			mf_path.c mf_loadpath.c my_file.c \
			my_open.c my_create.c my_dup.c my_seek.c my_read.c \
			my_pread.c my_write.c \
			mf_keycache.c mf_keycaches.c my_crc32.c \
			mf_keycaches.c my_crc32.c \
			mf_iocache.c mf_iocache2.c mf_cache.c mf_tempfile.c \
			mf_tempdir.c my_lock.c mf_brkhant.c my_alarm.c \
			my_malloc.c my_realloc.c my_once.c mulalloc.c \
Loading