diff options
author | unknown <tsmith@quadxeon.mysql.com> | 2007-03-07 07:21:24 +0100 |
---|---|---|
committer | unknown <tsmith@quadxeon.mysql.com> | 2007-03-07 07:21:24 +0100 |
commit | a69a96e26a06d08d5f1060469c630f6296c64dfc (patch) | |
tree | 3b6fe53494b0d386d485258b18617577fa500e46 /mysys | |
parent | 0ac63815ff77c208b1312427cda72b9680d03709 (diff) | |
parent | 01fc4d068466234ceeea20a0f8ae0e77e36fd90f (diff) | |
download | mariadb-git-a69a96e26a06d08d5f1060469c630f6296c64dfc.tar.gz |
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/51
client/mysqltest.c:
Auto merged
include/my_pthread.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysys/my_wincond.c:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
client/mysql_upgrade.c:
Manual merge; I chose to keep Magnus' changes because they make the code
more simple; always use *only* the option file created by mysql_upgrade.
mysql-test/extra/binlog_tests/ctype_cp932.test:
Manual merge
mysql-test/r/binlog_row_ctype_cp932.result:
Manual merge
mysql-test/r/binlog_stm_ctype_cp932.result:
Manual merge
mysql-test/r/mysqlbinlog.result:
Manual merge
mysql-test/r/rpl_switch_stm_row_mixed.result:
Manual merge
mysql-test/t/mysqlbinlog.test:
Manual merge
mysql-test/t/rpl_switch_stm_row_mixed.test:
Manual merge
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_iocache.c | 34 | ||||
-rw-r--r-- | mysys/my_symlink2.c | 4 |
2 files changed, 22 insertions, 16 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index e40490776f8..d2ace12da4d 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -170,24 +170,28 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize, info->arg = 0; info->alloced_buffer = 0; info->buffer=0; + info->seek_not_done= 0; - pos= my_tell(file, MYF(0)); - if ((pos == (my_off_t) -1) && (my_errno == ESPIPE)) + if (file >= 0) { - /* - This kind of object doesn't support seek() or tell(). Don't set a flag - that will make us again try to seek() later and fail. - */ - info->seek_not_done= 0; - /* - Additionally, if we're supposed to start somewhere other than the - the beginning of whatever this file is, then somebody made a bad - assumption. - */ - DBUG_ASSERT(seek_offset == 0); + pos= my_tell(file, MYF(0)); + if ((pos == (my_off_t) -1) && (my_errno == ESPIPE)) + { + /* + This kind of object doesn't support seek() or tell(). Don't set a + flag that will make us again try to seek() later and fail. + */ + info->seek_not_done= 0; + /* + Additionally, if we're supposed to start somewhere other than the + the beginning of whatever this file is, then somebody made a bad + assumption. + */ + DBUG_ASSERT(seek_offset == 0); + } + else + info->seek_not_done= test(seek_offset != pos); } - else - info->seek_not_done= test(file >= 0 && seek_offset != pos); info->disk_writes= 0; #ifdef THREAD diff --git a/mysys/my_symlink2.c b/mysys/my_symlink2.c index 279672be11c..6ea22790998 100644 --- a/mysys/my_symlink2.c +++ b/mysys/my_symlink2.c @@ -33,7 +33,9 @@ File my_create_with_symlink(const char *linkname, const char *filename, int create_link; char abs_linkname[FN_REFLEN]; DBUG_ENTER("my_create_with_symlink"); - DBUG_PRINT("enter", ("linkname: %s filename: %s", linkname, filename)); + DBUG_PRINT("enter", ("linkname: %s filename: %s", + linkname ? linkname : "(null)", + filename ? filename : "(null)")); if (my_disable_symlinks) { |