diff options
-rw-r--r-- | BitKeeper/etc/config | 1 | ||||
-rw-r--r-- | client/mysqltest.c | 15 | ||||
-rw-r--r-- | mysql-test/r/derived.result | 4 | ||||
-rw-r--r-- | mysql-test/r/rpl000009.result | 12 | ||||
-rw-r--r-- | mysql-test/t/derived.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl000009.test | 4 |
6 files changed, 25 insertions, 13 deletions
diff --git a/BitKeeper/etc/config b/BitKeeper/etc/config index ea30f368b52..c609fcdbd49 100644 --- a/BitKeeper/etc/config +++ b/BitKeeper/etc/config @@ -71,3 +71,4 @@ hours: [arjen:]checkout:get [nick:]checkout:get checkout:edit +eoln:unix diff --git a/client/mysqltest.c b/client/mysqltest.c index 4bcfe93c278..741da982008 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1662,16 +1662,16 @@ int do_while(struct st_query* q) happen for any tests in the test suite. */ -char my_getc(FILE *file) +int my_getc(FILE *file) { if (line_buffer_pos == line_buffer) return fgetc(file); - return line_buffer[--line_buffer_pos]; + return *--line_buffer_pos; } void my_ungetc(int c) { - line_buffer[line_buffer_pos++]= c; + *line_buffer_pos++= (char) c; } @@ -1692,8 +1692,9 @@ my_bool end_of_query(int c) return 1; /* Found delimiter */ /* didn't find delimiter, push back things that we read */ - for (j = 1 ; j <= i ; j++) - my_ungetc(tmp[j]); + my_ungetc(c); + while (i > 1) + my_ungetc(tmp[--i]); return 0; } @@ -2396,9 +2397,6 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags) } } - if (glob_replace) - free_replace(); - if (record) { if (!q->record_file[0] && !result_file) @@ -2419,6 +2417,7 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags) mysql_error(mysql); end: + free_replace(); last_result=0; if (ds == &ds_tmp) dynstr_free(&ds_tmp); diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 7e5c519e108..f5754bb3332 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -271,8 +271,8 @@ delete P1.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Cou select * from t1; N M 3 0 -delete P1.*,P2.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; -ERROR HY000: The target table P2 of the DELETE is not updatable +delete P1.*,p2.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS p2 ON P1.N = p2.N; +ERROR HY000: The target table p2 of the DELETE is not updatable delete P1.* from `t1` AS P1 INNER JOIN (SELECT aaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; ERROR 42S22: Unknown column 'aaa' in 'field list' drop table t1; diff --git a/mysql-test/r/rpl000009.result b/mysql-test/r/rpl000009.result index 1f78a505280..bb82dcb1e6a 100644 --- a/mysql-test/r/rpl000009.result +++ b/mysql-test/r/rpl000009.result @@ -112,6 +112,18 @@ n s 2 two test 3 three test 4 four test +stop slave; +reset slave; +load data from master; +start slave; +insert into mysqltest.t1 values (5, 'five bar'); +select * from mysqltest.t1; +n s +1 one test +2 two test +3 three test +4 four test +5 five bar load table mysqltest.t1 from master; ERROR 42S01: Table 't1' already exists drop table mysqltest.t1; diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index a13d5de40f0..f0d5a253bf4 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -157,8 +157,8 @@ UPDATE `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) UPDATE `t1` AS P1 INNER JOIN (SELECT aaaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2; delete P1.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; select * from t1; ---error 1288 --replace_result P2 p2 +--error 1288 delete P1.*,P2.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; -- error 1054 delete P1.* from `t1` AS P1 INNER JOIN (SELECT aaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; diff --git a/mysql-test/t/rpl000009.test b/mysql-test/t/rpl000009.test index 4b69fb3e31c..59451bc888d 100644 --- a/mysql-test/t/rpl000009.test +++ b/mysql-test/t/rpl000009.test @@ -127,11 +127,11 @@ load data from master; start slave; # see if replication coordinates were restored fine connection master; -insert into bar.t1 values (5, 'five bar'); +insert into mysqltest.t1 values (5, 'five bar'); save_master_pos; connection slave; sync_with_master; -select * from bar.t1; +select * from mysqltest.t1; # Check that LOAD DATA FROM MASTER reports the error if it can't drop a # table to be overwritten. |