Commit 7cc9c3c6 authored by unknown's avatar unknown

Don't initialize fulltext functions twice in multi-table-update


mysql-test/mysql-test-run.sh:
  Added option --extern (from 4.1)
mysql-test/r/multi_update.result:
  Portability fix
mysql-test/t/multi_update.test:
  Portability fix
parent 9b5167ee
......@@ -217,6 +217,7 @@ while test $# -gt 0; do
--slave-binary=*)
SLAVE_MYSQLD=`$ECHO "$1" | $SED -e "s;--slave-binary=;;"` ;;
--local) USE_RUNNING_SERVER="" ;;
--extern) USE_RUNNING_SERVER="1" ;;
--tmpdir=*) MYSQL_TMP_DIR=`$ECHO "$1" | $SED -e "s;--tmpdir=;;"` ;;
--local-master)
MASTER_MYPORT=3306;
......
......@@ -182,13 +182,13 @@ insert into t1 values(1,1,NULL);
insert into t2 values(1,10,NULL),(2,20,NULL);
set timestamp=1038000000;
UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n;
select * from t1;
n d t
1 10 20021123002000
select * from t2;
n d t
1 10 20021127154957
2 20 20021127154957
select n,d,unix_timestamp(t) from t1;
n d unix_timestamp(t)
1 10 1038000000
select n,d,unix_timestamp(t) from t2;
n d unix_timestamp(t)
1 10 1038401397
2 20 1038401397
UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n;
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1
drop table t1,t2;
......
......@@ -183,8 +183,8 @@ insert into t1 values(1,1,NULL);
insert into t2 values(1,10,NULL),(2,20,NULL);
set timestamp=1038000000;
UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n;
select * from t1;
select * from t2;
select n,d,unix_timestamp(t) from t1;
select n,d,unix_timestamp(t) from t2;
--error 1064
UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n;
drop table t1,t2;
......
......@@ -517,7 +517,6 @@ int multi_update::prepare(List<Item> &not_used_values)
for (i=0 ; i < table_count ; i++)
set_if_bigger(max_fields, fields_for_table[i]->elements);
copy_field= new Copy_field[max_fields];
init_ftfuncs(thd,1);
DBUG_RETURN(thd->fatal_error != 0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment