1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed probelm with count(*) and normal functions when no matchin rows.

Changed 'lib' to 'master-data'
Fix for slow slaves
This commit is contained in:
monty@donna.mysql.fi
2001-04-21 17:12:59 +03:00
parent 0f37b1244b
commit 1e3df575b9
11 changed files with 48 additions and 10 deletions

View File

@ -30,7 +30,7 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(distdir)/t
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.001 $(distdir)/std_data
install-data-local:
$(mkinstalldirs) \

View File

@ -9,5 +9,7 @@ connection master;
reset master;
connection slave;
reset slave;
# Clean up old test tables
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
@r/slave-running.result show status like 'Slave_running';

View File

@ -25,8 +25,8 @@ then
data=var/slave-data
ldata=$fix_bin/var/slave-data
else
data=var/lib
ldata=$fix_bin/var/lib
data=var/master-data
ldata=$fix_bin/var/master-data
fi
mdata=$data/mysql

View File

@ -188,7 +188,7 @@ done
#--
MYRUN_DIR=$MYSQL_TEST_DIR/var/run
MASTER_MYDDIR="$MYSQL_TEST_DIR/var/lib"
MASTER_MYDDIR="$MYSQL_TEST_DIR/var/master-data"
MASTER_MYSOCK="$MYSQL_TMP_DIR/mysql-master.sock"
MASTER_MYPID="$MYRUN_DIR/mysqld.pid"
MASTER_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld.log"
@ -288,6 +288,8 @@ prompt_user ()
read unused
}
# We can't use diff -u as this isn't portable
show_failed_diff ()
{
reject_file=r/$1.reject
@ -296,7 +298,7 @@ show_failed_diff ()
then
echo "Below are the diffs between actual and expected results:"
echo "-------------------------------------------------------"
$DIFF -u $result_file $reject_file
$DIFF -c $result_file $reject_file
echo "-------------------------------------------------------"
echo "Please e-mail the above, along with the output of mysqlbug"
echo "and any other relevant info to bugs@lists.mysql.com"

View File

@ -30,3 +30,7 @@ Documentation 0
Host communication 0
kkkkkkkkkkk lllllllllll 3
Test Procedures 0
1+1 a count(*)
2 a 0
1+1 a count(*)
2 a 0

View File

@ -2,6 +2,7 @@
# Test of group (Failed for Lars Hoss <lh@pbm.de>)
#
drop table if exists t1,t2;
CREATE TABLE t1 (
spID int(10) unsigned,
userID int(10) unsigned,
@ -208,3 +209,14 @@ select value,description,bug_id from t2 left join t1 on t2.program=t1.product an
select value,description,COUNT(bug_id) from t2 left join t1 on t2.program=t1.product and t2.value=t1.component where program="AAAAA" group by value;
drop table t1,t2;
#
# Problem with functions and group functions when no matching rows
#
create table t1 (foo int);
insert into t1 values (1);
select 1+1, "a",count(*) from t1 where foo in (2);
insert into t1 values (1);
select 1+1,"a",count(*) from t1 where foo in (2);
drop table t1;

View File

@ -1,3 +1,3 @@
rm -f $MYSQL_TEST_DIR/var/lib/master-bin.*
cp $MYSQL_TEST_DIR/std_data/master-bin.001 $MYSQL_TEST_DIR/var/lib/
echo ./master-bin.001 > $MYSQL_TEST_DIR/var/lib/master-bin.index
rm -f $MYSQL_TEST_DIR/var/master-data/master-bin.*
cp $MYSQL_TEST_DIR/std_data/master-bin.001 $MYSQL_TEST_DIR/var/master-data/
echo ./master-bin.001 > $MYSQL_TEST_DIR/var/master-data/master-bin.index