mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-new-maint
This commit is contained in:
@ -251,16 +251,22 @@ drop table t17583;
|
|||||||
#
|
#
|
||||||
|
|
||||||
# This should work just fine...
|
# This should work just fine...
|
||||||
--exec echo "DELIMITER /" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
|
--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
|
||||||
--exec echo "SELECT 1/" >> $MYSQLTEST_VARDIR/tmp/bug21412.sql
|
DELIMITER /
|
||||||
|
SELECT 1/
|
||||||
|
EOF
|
||||||
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
|
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
|
||||||
|
|
||||||
# This should give an error...
|
# This should give an error...
|
||||||
--exec echo "DELIMITER \\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
|
--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
|
||||||
|
DELIMITER \
|
||||||
|
EOF
|
||||||
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
|
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
|
||||||
|
|
||||||
# As should this...
|
# As should this...
|
||||||
--exec echo "DELIMITER \\\\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
|
--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
|
||||||
|
DELIMITER \\
|
||||||
|
EOF
|
||||||
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
|
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -170,24 +170,28 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
|
|||||||
info->arg = 0;
|
info->arg = 0;
|
||||||
info->alloced_buffer = 0;
|
info->alloced_buffer = 0;
|
||||||
info->buffer=0;
|
info->buffer=0;
|
||||||
|
info->seek_not_done= 0;
|
||||||
|
|
||||||
pos= my_tell(file, MYF(0));
|
if (file >= 0)
|
||||||
if ((pos == (my_off_t) -1) && (my_errno == ESPIPE))
|
|
||||||
{
|
{
|
||||||
/*
|
pos= my_tell(file, MYF(0));
|
||||||
This kind of object doesn't support seek() or tell(). Don't set a flag
|
if ((pos == (my_off_t) -1) && (my_errno == ESPIPE))
|
||||||
that will make us again try to seek() later and fail.
|
{
|
||||||
*/
|
/*
|
||||||
info->seek_not_done= 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.
|
||||||
Additionally, if we're supposed to start somewhere other than the
|
*/
|
||||||
the beginning of whatever this file is, then somebody made a bad
|
info->seek_not_done= 0;
|
||||||
assumption.
|
/*
|
||||||
*/
|
Additionally, if we're supposed to start somewhere other than the
|
||||||
DBUG_ASSERT(seek_offset == 0);
|
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;
|
info->disk_writes= 0;
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
|
Reference in New Issue
Block a user