Commit df8e60ae authored by joerg@trift2.'s avatar joerg@trift2.
Browse files

Merge trift2.:/MySQL/M50/mysql-5.0

into  trift2.:/MySQL/M50/push-5.0
parents 00f1af47 30b56973
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)

PROJECT(MySql)

# This reads user configuration, generated by configure.js.
+2 −0
Original line number Diff line number Diff line
@@ -691,6 +691,8 @@ extern WF_PACK *wf_comp(my_string str);
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
extern void wf_end(struct wild_file_pack *buffer);
extern size_s strip_sp(my_string str);
extern my_bool array_append_string_unique(const char *str,
                                          const char **array, size_t size);
extern void get_date(my_string to,int timeflag,time_t use_time);
extern void soundex(CHARSET_INFO *, my_string out_pntr, my_string in_pntr,pbool remove_garbage);
extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file,
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
			mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo\
			mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo \
			mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
			my_symlink.lo my_fstream.lo \
			my_symlink.lo my_fstream.lo mf_arr_appstr.lo \
			mf_loadpath.lo my_pthread.lo my_thr_init.lo \
			thr_mutex.lo mulalloc.lo string.lo \
                        default.lo default_modify.lo \
+16 −3
Original line number Diff line number Diff line
@@ -155,13 +155,13 @@ set @@sql_mode='ansi,traditional';
insert into t1 values ('2007-03-23 13:49:38','2007-03-23 13:49:38');
insert into t1 set dt='2007-03-23 13:49:38',da=dt;
# Test error handling
--error 1292
--error ER_TRUNCATED_WRONG_VALUE
insert into t1 values ('2007-03-32','2007-03-23 13:49:38');
select * from t1;
drop table t1;
--error 1067
--error ER_INVALID_DEFAULT
create table t1 (da date default '1962-03-32 23:33:34', dt datetime default '1962-03-03');
--error 1067
--error ER_INVALID_DEFAULT
create table t1 (t time default '916:00:00 a');
set @@sql_mode= @org_mode;

@@ -169,6 +169,19 @@ set @@sql_mode= @org_mode;
#
# Bug#27590: Wrong DATE/DATETIME comparison.  
#
## The following sub test will fail (difference to expected result) if the
## select curdate() < now(), f1 < now(), cast(f1 as date) < now() from t1;
## runs exact at midnight ('00:00:00').
## ( Bug#29290 type_datetime.test failure in 5.1 )
## Therefore we sleep a bit if we are too close to midnight.
## The complete test itself needs around 1 second.
## Therefore a time_distance to midnight of 5 seconds should be sufficient.
if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 5)`)
{
   # We are here when CURTIME() is between '23:59:56' and '23:59:59'.
   # So a sleep time of 5 seconds brings us between '00:00:01' and '00:00:04'.
   --real_sleep 5
}
create table t1 (f1 date, f2 datetime, f3 timestamp);
insert into t1(f1) values(curdate());
select curdate() < now(), f1 < now(), cast(f1 as date) < now() from t1;
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_m
				errors.c hash.c list.c md5.c mf_brkhant.c mf_cache.c mf_dirname.c mf_fn_ext.c
				mf_format.c mf_getdate.c mf_iocache.c mf_iocache2.c mf_keycache.c 
				mf_keycaches.c mf_loadpath.c mf_pack.c mf_path.c mf_qsort.c mf_qsort2.c
				mf_radix.c mf_same.c mf_sort.c mf_soundex.c mf_strip.c mf_tempdir.c
				mf_radix.c mf_same.c mf_sort.c mf_soundex.c mf_strip.c mf_arr_appstr.c mf_tempdir.c
				mf_tempfile.c mf_unixpath.c mf_wcomp.c mf_wfile.c mulalloc.c my_access.c
				my_aes.c my_alarm.c my_alloc.c my_append.c my_bit.c my_bitmap.c my_chsize.c
				my_clock.c my_compress.c my_conio.c my_copy.c my_crc32.c my_create.c my_delete.c
Loading