Commit b1b1c8ad authored by df@pippilotta.erinye.com's avatar df@pippilotta.erinye.com
Browse files

Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0

into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0
parents d735865d a877145d
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -496,6 +496,10 @@ void handle_error(struct st_command*,
void handle_no_error(struct st_command*);

#ifdef EMBEDDED_LIBRARY

/* attributes of the query thread */
pthread_attr_t cn_thd_attrib;

/*
  send_one_query executes query in separate thread what is
  necessary in embedded library to run 'send' in proper way.
@@ -534,7 +538,7 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len,
  cn->cur_query= q;
  cn->cur_query_len= q_len;
  cn->query_done= 0;
  if (pthread_create(&tid, NULL, send_one_query, (void*)cn))
  if (pthread_create(&tid, &cn_thd_attrib, send_one_query, (void*)cn))
    die("Cannot start new thread for query");

  return 0;
@@ -6170,6 +6174,12 @@ int main(int argc, char **argv)
  next_con= connections + 1;
  cur_con= connections;

#ifdef EMBEDDED_LIBRARY
  /* set appropriate stack for the 'query' threads */
  (void) pthread_attr_init(&cn_thd_attrib);
  pthread_attr_setstacksize(&cn_thd_attrib, DEFAULT_THREAD_STACK);
#endif /*EMBEDDED_LIBRARY*/

  /* Init file stack */
  memset(file_stack, 0, sizeof(file_stack));
  file_stack_end=
+19 −0
Original line number Diff line number Diff line
DROP TABLE IF EXISTS t1;
Warnings:
Note	1051	Unknown table 't1'
CREATE TABLE t1 (
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
b varchar(32) character set utf8 collate utf8_bin NOT NULL )
ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES
('AAAAAAAAAA','AAAAAAAAAA'), ('AAAAAAAAAB','AAAAAAAAAB '),
('AAAAAAAAAB','AAAAAAAAAB'), ('AAAAAAAAAC','AAAAAAAAAC'),
('AAAAAAAAAD','AAAAAAAAAD'), ('AAAAAAAAAE','AAAAAAAAAE'),
('AAAAAAAAAF','AAAAAAAAAF'), ('AAAAAAAAAG','AAAAAAAAAG'),
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
set tmp_table_size=1024;
SELECT MAX(a) FROM t1 GROUP BY a,b;
ERROR 23000: Can't write; duplicate key in table ''
set tmp_table_size=default;
DROP TABLE t1;
+21 −0
Original line number Diff line number Diff line
@@ -864,4 +864,25 @@ SELECT Overlaps(@horiz1, @point2) FROM DUAL;
Overlaps(@horiz1, @point2)
0
DROP TABLE t1;
create table t1(f1 geometry, f2 point, f3 linestring);
select f1 from t1 union select f1 from t1;
f1
insert into t1 (f2,f3) values (GeomFromText('POINT(1 1)'),
GeomFromText('LINESTRING(0 0,1 1,2 2)'));
select AsText(f2),AsText(f3) from t1;
AsText(f2)	AsText(f3)
POINT(1 1)	LINESTRING(0 0,1 1,2 2)
select AsText(a) from (select f2 as a from t1 union select f3 from t1) t;
AsText(a)
POINT(1 1)
LINESTRING(0 0,1 1,2 2)
create table t2 as select f2 as a from t1 union select f3 from t1;
desc t2;
Field	Type	Null	Key	Default	Extra
a	point	YES		NULL	
select AsText(a) from t2;
AsText(a)
POINT(1 1)
LINESTRING(0 0,1 1,2 2)
drop table t1, t2;
End of 5.0 tests
+18 −0
Original line number Diff line number Diff line
@@ -403,4 +403,22 @@ use test;
drop database mysqltest_1;
drop database mysqltest_2;
drop user mysqltest_u1@localhost;
grant all on `mysqltest\_%`.* to mysqltest_1@localhost with grant option;
grant usage on *.* to mysqltest_2@localhost;
create database mysqltest_1;
use mysqltest_1;
create table t1 (f1 int);
grant create on `mysqltest\_1`.* to mysqltest_2@localhost;
grant select on mysqltest_1.t1 to mysqltest_2@localhost;
create database mysqltest_3;
ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest_3'
use mysqltest_1;
create table t2(f1 int);
select * from t1;
f1
drop database mysqltest_1;
revoke all privileges, grant option from mysqltest_1@localhost;
revoke all privileges, grant option from mysqltest_2@localhost;
drop user mysqltest_1@localhost;
drop user mysqltest_2@localhost;
End of 5.0 tests
+11 −0
Original line number Diff line number Diff line
@@ -1315,3 +1315,14 @@ TABLE_PRIVILEGES information_schema.TABLE_PRIVILEGES 1
TRIGGERS	information_schema.TRIGGERS	1
USER_PRIVILEGES	information_schema.USER_PRIVILEGES	1
VIEWS	information_schema.VIEWS	1
create table t1(f1 int);
create view v1 as select f1+1 as a from t1;
create table t2 (f1 int, f2 int);
create view v2 as select f1+1 as a, f2 as b from t2;
select table_name, is_updatable from information_schema.views;
table_name	is_updatable
v1	NO
v2	YES
delete from v1;
drop view v1,v2;
drop table t1,t2;
Loading