Commit 96e7be58 authored by unknown's avatar unknown
Browse files

After merge fixes

Some bigger code changes was necessary becasue of the multi-table-update and the new HANDLER code


include/hash.h:
  Added back function that's was used in 4.0
mysql-test/r/delete.result:
  Update results after merge
mysql-test/r/flush_table.result:
  Update results after merge
mysql-test/r/func_str.result:
  Update results after merge
mysql-test/r/handler.result:
  Update results after merge
  Change is big becasue in MySQL 4.1 you are not allowed to qualify the handler alias with a databasename
mysql-test/r/multi_update.result:
  More startup cleanups
mysql-test/r/rename.result:
  More startup-cleanups
mysql-test/r/select.result:
  More startup cleanups
mysql-test/r/show_check.result:
  More startup-cleanups
mysql-test/t/ctype_latin1_de.test:
  Cleanup
mysql-test/t/derived.test:
  Portability fix
mysql-test/t/handler.test:
  Update results after merge
  Change is big becasue in MySQL 4.1 you are not allowed to qualify the handler alias with a databasename
mysql-test/t/multi_update.test:
  More startup cleanups
mysql-test/t/range.test:
  More comments
mysql-test/t/rename.test:
  More startup cleanups
mysql-test/t/select.test:
  More startup cleanups
mysql-test/t/show_check.test:
  More startup cleanups
mysql-test/t/type_timestamp.test:
  Add back test deleted during merge
sql/item_cmpfunc.cc:
  After merge fixes
sql/item_func.cc:
  Remove compiler warning
sql/mysql_priv.h:
  After merge fixes
sql/mysqld.cc:
  After merge fixes
sql/sql_acl.cc:
  More debugging
sql/sql_base.cc:
  After merge fixes
  (This fix was needed bacause of multi-table-update reopens tables)
sql/sql_handler.cc:
  After merge fixes
sql/sql_lex.h:
  After merge fixes
sql/sql_select.cc:
  After merge fixes
sql/sql_show.cc:
  After merge fixes
sql/sql_table.cc:
  After merge fixes
  Simple cleanup of mysql_discard_or_import_tablespace
sql/sql_update.cc:
  After merge fixes
  Rework mysql_multi_update to take into account derived tables.
sql/sql_yacc.yy:
  After merge fixes
parent bbab9ec6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ my_bool hash_update(HASH *hash,byte *record,byte *old_key,uint old_key_length);
void hash_replace(HASH *hash, uint idx, byte *new_row);
my_bool hash_check(HASH *hash);			/* Only in debug library */

#define hash_clear(H) bzero((char*) (H),sizeof(*(H)))
#define hash_inited(H) ((H)->array.buffer != 0)

#ifdef	__cplusplus
+11 −11
Original line number Diff line number Diff line
@@ -58,6 +58,17 @@ select count(*) from t1;
count(*)
0
drop table t1;
create table t1 (a int not null auto_increment primary key, b char(32));
insert into t1 (b) values ('apple'), ('apple');
select * from t1;
a	b
1	apple
2	apple
delete t1 from t1, t1 as t2 where t1.b = t2.b and t1.a > t2.a;
select * from t1;
a	b
1	apple
drop table t1;
create table t11 (a int NOT NULL, b int, primary key (a));
create table t12 (a int NOT NULL, b int, primary key (a));
create table t2 (a int NOT NULL, b int, primary key (a));
@@ -130,14 +141,3 @@ select * from t1;
a	b
7	7
drop table t1;
create table t1 (a int not null auto_increment primary key, b char(32));
insert into t1 (b) values ('apple'), ('apple');
select * from t1;
a	b
1	apple
2	apple
delete t1 from t1, t1 as t2 where t1.b = t2.b and t1.a > t2.a;
select * from t1;
a	b
1	apple
drop table t1;
+3 −4
Original line number Diff line number Diff line
@@ -42,11 +42,11 @@ table_id
test.t2

handler t1 open as a1;
Not unique table/alias: 'a1'
ERROR 42000: Not unique table/alias: 'a1'
handler t1 open as a2;
Not unique table/alias: 'a2'
ERROR 42000: Not unique table/alias: 'a2'
handler t2 open;
Not unique table/alias: 't2'
ERROR 42000: Not unique table/alias: 't2'
handler a1 read first limit 9;
table_id
test.t1
@@ -74,7 +74,6 @@ test.t2

flush table t2;
handler t2 close;
ERROR 42S02: Unknown table 't2' in HANDLER
drop table t1;
drop table t2;
create table t1(table_id char(20) primary key);
+1 −0
Original line number Diff line number Diff line
@@ -321,6 +321,7 @@ trim(trailing 'foo' from 'foo')

select trim(leading 'foo' from 'foo');
trim(leading 'foo' from 'foo')

select 1=_latin1'1';
1=_latin1'1'
1
+33 −37
Original line number Diff line number Diff line
@@ -230,40 +230,36 @@ create table t1(table_id char(20) primary key);
insert into t1 values ('test.t1');
insert into t1 values ('');
handler t1 open;
Not unique table/alias: 't1'
ERROR 42000: Not unique table/alias: 't1'
use test;
handler test.t1 read first limit 9;
Unknown table 'test.t1' in HANDLER
ERROR 42000: 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 'read first limit 9' at line 1
handler test_test.t1 read first limit 9;
table_id
test_test.t1

ERROR 42000: 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 'read first limit 9' at line 1
handler t1 read first limit 9;
table_id
test_test.t1

handler test_test.t2 read first limit 9;
table_id
test_test.t2

ERROR 42000: 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 'read first limit 9' at line 1
handler t2 read first limit 9;
table_id
test_test.t2

handler test_test.t1 close;
ERROR 42000: 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 'close' at line 1
handler t1 close;
Unknown table 't1' in HANDLER
drop table test_test.t1;
handler test_test.t2 close;
ERROR 42000: 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 'close' at line 1
handler t2 close;
Unknown table 't2' in HANDLER
drop table test_test.t2;
drop database test_test;
use test;
handler test.t1 close;
Unknown table 'test.t1' in HANDLER
ERROR 42000: 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 'close' at line 1
handler t1 close;
Unknown table 't1' in HANDLER
ERROR 42S02: Unknown table 't1' in HANDLER
drop table test.t1;
drop database if exists test_test;
drop table if exists t1;
@@ -291,20 +287,20 @@ insert into t1 values ('t1');
insert into t2 values ('t2');
insert into t3 values ('t3');
handler t1 open;
Not unique table/alias: 't1'
ERROR 42000: Not unique table/alias: 't1'
handler t2 open t1;
Not unique table/alias: 't1'
ERROR 42000: Not unique table/alias: 't1'
handler t3 open t1;
Not unique table/alias: 't1'
ERROR 42000: Not unique table/alias: 't1'
handler t1 read first limit 9;
c1
test_test.t1
handler test.t1 close;
Unknown table 'test.t1' in HANDLER
ERROR 42000: 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 'close' at line 1
handler test.t1 open h1;
Not unique table/alias: 'h1'
ERROR 42000: Not unique table/alias: 'h1'
handler test_test.t1 open h1;
Not unique table/alias: 'h1'
ERROR 42000: Not unique table/alias: 'h1'
handler test_test.t3 open h3;
handler test.t1 open h2;
handler t1 read first limit 9;
@@ -319,24 +315,24 @@ t1
handler h3 read first limit 9;
c1
test_test.t3
handler test.h2 read first limit 9;
handler h2 read first limit 9;
c1
t1
handler test.h1 close;
Unknown table 'test.h1' in HANDLER
handler test_test.t1 close;
handler test_test.h1 close;
ERROR 42000: 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 'close' at line 1
handler t1 close;
handler h1 close;
handler h2 close;
handler t1 read first limit 9;
Unknown table 't1' in HANDLER
ERROR 42S02: Unknown table 't1' in HANDLER
handler h1 read first limit 9;
Unknown table 'h1' in HANDLER
ERROR 42S02: Unknown table 'h1' in HANDLER
handler h2 read first limit 9;
Unknown table 'h2' in HANDLER
ERROR 42S02: Unknown table 'h2' in HANDLER
handler h3 read first limit 9;
c1
test_test.t3
handler test_test.h3 read first limit 9;
handler h3 read first limit 9;
c1
test_test.t3
use test_test;
@@ -344,8 +340,8 @@ handler h3 read first limit 9;
c1
test_test.t3
handler test.h3 read first limit 9;
Unknown table 'test.h3' in HANDLER
handler test_test.h3 close;
ERROR 42000: 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 'read first limit 9' at line 1
handler h3 close;
use test;
drop table t3;
drop table t2;
@@ -383,7 +379,7 @@ c1
t5
alter table t1 engine=MyISAM;
handler h1 read first limit 9;
Unknown table 'h1' in HANDLER
ERROR 42S02: Unknown table 'h1' in HANDLER
handler h2 read first limit 9;
c1
t2
@@ -398,7 +394,7 @@ c1
t5
alter table t5 engine=MyISAM;
handler h1 read first limit 9;
Unknown table 'h1' in HANDLER
ERROR 42S02: Unknown table 'h1' in HANDLER
handler h2 read first limit 9;
c1
t2
@@ -409,20 +405,20 @@ handler h4 read first limit 9;
c1
t4
handler h5 read first limit 9;
Unknown table 'h5' in HANDLER
ERROR 42S02: Unknown table 'h5' in HANDLER
alter table t3 engine=MyISAM;
handler h1 read first limit 9;
Unknown table 'h1' in HANDLER
ERROR 42S02: Unknown table 'h1' in HANDLER
handler h2 read first limit 9;
c1
t2
handler h3 read first limit 9;
Unknown table 'h3' in HANDLER
ERROR 42S02: Unknown table 'h3' in HANDLER
handler h4 read first limit 9;
c1
t4
handler h5 read first limit 9;
Unknown table 'h5' in HANDLER
ERROR 42S02: Unknown table 'h5' in HANDLER
handler h2 close;
handler h4 close;
handler t1 open as h1_1;
@@ -439,11 +435,11 @@ c1
t1
alter table t1 engine=MyISAM;
handler h1_1 read first limit 9;
Unknown table 'h1_1' in HANDLER
ERROR 42S02: Unknown table 'h1_1' in HANDLER
handler h1_2 read first limit 9;
Unknown table 'h1_2' in HANDLER
ERROR 42S02: Unknown table 'h1_2' in HANDLER
handler h1_3 read first limit 9;
Unknown table 'h1_3' in HANDLER
ERROR 42S02: Unknown table 'h1_3' in HANDLER
drop table t1;
drop table t2;
drop table t3;
Loading