1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
Docs/manual.texi:
  SCCS merged
This commit is contained in:
unknown
2001-05-02 12:18:05 +02:00
54 changed files with 2140 additions and 990 deletions

View File

@ -24,10 +24,10 @@ PATH=/bin:/usr/bin:/usr/local/bin:/usr/bsd:/usr/X11R6/bin
which ()
{
DIRS=`echo $PATH | tr ":" " "`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
for file
do
for dir in $DIRS
for dir in $PATH
do
if test -f $dir/$file
then
@ -38,6 +38,7 @@ which ()
echo "which: no $file in ($PATH)"
exit 1
done
IFS="$save_ifs"
}
@ -211,6 +212,9 @@ SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err"
SMALL_SERVER="-O key_buffer_size=1M -O sort_buffer=256K -O max_heap_table_size=1M"
export MASTER_MYPORT
export SLAVE_MYPORT
if [ x$SOURCE_DIST = x1 ] ; then
MY_BASEDIR=$MYSQL_TEST_DIR
else

View File

@ -21,3 +21,7 @@ t2 CREATE TABLE `t2` (
FULLTEXT KEY `tix` (`inhalt`)
) TYPE=MyISAM
ticket inhalt
ticket inhalt
3 foobar
ticket inhalt
3 foobar

View File

@ -78,3 +78,10 @@ f1 f2
12 ted
12 ted
12 ted
table type possible_keys key key_len ref rows Extra
t1 ALL btn NULL NULL NULL 14 where used
btn
table type possible_keys key key_len ref rows Extra
t1 ALL btn NULL NULL NULL 14 where used
table type possible_keys key key_len ref rows Extra
t1 ref btn btn 11 const,const 10 where used

View File

@ -53,7 +53,7 @@ t1 ref a,b a 5 const 1 where used
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 12 where used
table type possible_keys key key_len ref rows Extra
t1 range a,b a 5 NULL 12 where used
t1 range a,b a 5 NULL 5 where used
table type possible_keys key key_len ref rows Extra
t1 range a,b a 5 NULL 4 where used
table type possible_keys key key_len ref rows Extra

View File

@ -5,8 +5,6 @@ sum(length(word))
71
(@id := id) - id
0
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
127.0.0.1 root 9306 1 master-bin.001 939 No 1053 Slave: query ' update t1 set n = n + get_lock('crash_lock', 2)' partially completed on the master and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START; 0
count(*)
10
n

View File

@ -42,7 +42,10 @@ ticket2.id = ttxt.ticket
WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
INSERT INTO t1 VALUES (3,3);
select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
select t1.id FROM t2 as ttxt,t1
INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket
WHERE t1.id = ticket2.ticket and
match(ttxt.inhalt) against ('foobar');
# Check that we get 'fulltext' index in SHOW CREATE
@ -53,4 +56,9 @@ show create table t2;
select * from t2 where MATCH inhalt AGAINST (NULL);
# MATCH in HAVING (pretty useless, but still it should work)
select * from t2 where MATCH inhalt AGAINST ('foobar');
select * from t2 having MATCH inhalt AGAINST ('foobar');
drop table t1,t2;

View File

@ -2,6 +2,7 @@
# Test of heap tables.
#
drop table if exists t1;
create table t1 (a int not null,b int not null, primary key (a)) type=heap comment="testing heaps" avg_row_length=100 min_rows=1 max_rows=100;
insert into t1 values(1,1),(2,2),(3,3),(4,4);
delete from t1 where a=1 or a=0;
@ -85,3 +86,17 @@ INSERT into t1 set f1=12,f2="ted";
delete from t1 where f2="bill";
select * from t1;
drop table t1;
#
# Test when using part key searches
#
create table t1 (btn char(10) not null, key(btn)) type=heap;
insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
explain select * from t1 where btn like "q%";
select * from t1 where btn like "q%";
alter table t1 add column new_col char(1) not null, add key (btn,new_col), drop key btn;
update t1 set new_col=btn;
explain select * from t1 where btn="a";
explain select * from t1 where btn="a" and new_col="a";
drop table t1;

View File

@ -1,22 +1,21 @@
source include/master-slave.inc;
connection master;
use test;
drop table if exists t1;
drop table if exists t1,t3;
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
drop table if exists foo;
set password = password('foo');
set password = password('');
create table foo(n int);
insert into foo values(1),(2);
create table t3(n int);
insert into t3 values(1),(2);
save_master_pos;
connection slave;
sync_with_master;
use test;
select * from foo;
select * from t3;
select sum(length(word)) from t1;
connection master;
drop table t1;
drop table t1,t3;
save_master_pos;
connection slave;
sync_with_master;
@ -59,7 +58,12 @@ connection slave;
sync_with_master ;
#give the slave a chance to exit
sleep 0.5;
show slave status;
# The following test can't be done because the result of Pos will differ
# on different computers
# --replace_result 9306 9999 3334 9999 3335 9999
# show slave status;
set sql_slave_skip_counter=1;
slave start;
select count(*) from t1;

View File

@ -10,22 +10,22 @@ reset slave;
show slave status;
change master to master_host='127.0.0.1';
show slave status;
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=9306;
eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT;
show slave status;
slave start;
sync_with_master;
show slave status;
connection master;
drop table if exists foo;
create table foo (n int);
insert into foo values (10),(45),(90);
drop table if exists t1;
create table t1 (n int);
insert into t1 values (10),(45),(90);
save_master_pos;
connection slave;
sync_with_master;
select * from foo;
select * from t1;
connection master;
drop table foo;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;

View File

@ -7,9 +7,11 @@ connection slave;
!slave start;
system chmod 600 var/slave-data/master.info;
!slave start;
!change master to master_host='127.0.0.1',master_port=9306,master_user='root';
!eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
master_user='root';
reset slave;
!change master to master_host='127.0.0.1',master_port=9306,master_user='root';
eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT,
master_user='root';
connection master;
reset master;
connection slave;