Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-13 20:16:46+04:00, holyfoot@deer.(none) +18 -0
Merge mysql.com:/home/hf/work/embt/my50-embt
into mysql.com:/home/hf/work/embt/my51-embt
MERGE: 1.1810.2078.58
BitKeeper/deleted/.del-bdb.result@stripped, 2006-11-13 20:08:22+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.48.2.2
BitKeeper/deleted/.del-bdb.result@stripped, 2006-11-13 20:08:22+04:00, holyfoot@deer.(none) +0 -0
Merge rename: mysql-test/r/bdb.result -> BitKeeper/deleted/.del-bdb.result
BitKeeper/deleted/.del-bdb.test@stripped, 2006-11-13 20:08:22+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.50.1.5
BitKeeper/deleted/.del-bdb.test@stripped, 2006-11-13 20:08:22+04:00, holyfoot@deer.(none) +0 -0
Merge rename: mysql-test/t/bdb.test -> BitKeeper/deleted/.del-bdb.test
libmysqld/lib_sql.cc@stripped, 2006-11-13 20:08:22+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.107.1.10
mysql-test/mysql-test-run.pl@stripped, 2006-11-13 20:08:53+04:00, holyfoot@deer.(none) +0 -1
merging
MERGE: 1.30.1.87
mysql-test/r/flush_block_commit.result@stripped, 2006-11-13 20:10:14+04:00, holyfoot@deer.(none) +0 -0
SCCS merged
MERGE: 1.9.1.1
mysql-test/r/insert.result@stripped, 2006-11-13 20:11:14+04:00, holyfoot@deer.(none) +0 -6
merging
MERGE: 1.22.1.4
mysql-test/r/insert_select.result@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.35.1.7
mysql-test/r/join.result@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -2
Auto merged
MERGE: 1.38.1.1
mysql-test/t/backup.test@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.16.2.3
mysql-test/t/delayed.test@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.11.1.5
mysql-test/t/innodb.test@stripped, 2006-11-13 20:13:35+04:00, holyfoot@deer.(none) +1 -1
merging
MERGE: 1.118.2.9
mysql-test/t/insert.test@stripped, 2006-11-13 20:15:25+04:00, holyfoot@deer.(none) +1 -9
merging
MERGE: 1.22.1.2
mysql-test/t/join.test@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -1
Auto merged
MERGE: 1.32.1.1
mysql-test/t/status.test@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.15.1.2
mysql-test/t/trigger.test@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.34.1.20
sql/item_func.cc@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.270.25.2
sql/item_strfunc.cc@stripped, 2006-11-13 20:08:23+04:00, holyfoot@deer.(none) +0 -0
Auto merged
MERGE: 1.261.1.26
sql/share/errmsg.txt@stripped, 2006-11-13 20:16:37+04:00, holyfoot@deer.(none) +2 -4
merging
MERGE: 1.42.1.33
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: holyfoot
# Host: deer.(none)
# Root: /home/hf/work/embt/my51-embt/RESYNC
--- 1.324/sql/item_func.cc 2006-11-13 20:16:56 +04:00
+++ 1.325/sql/item_func.cc 2006-11-13 20:16:56 +04:00
@@ -3368,7 +3368,11 @@ longlong Item_func_release_lock::val_int
}
else
{
+#ifdef EMBEDDED_LIBRARY
+ if (ull->locked && pthread_equal(current_thd->real_id,ull->thread))
+#else
if (ull->locked && pthread_equal(pthread_self(),ull->thread))
+#endif
{
result=1; // Release is ok
item_user_lock_release(ull);
--- 1.294/sql/item_strfunc.cc 2006-11-13 20:16:56 +04:00
+++ 1.295/sql/item_strfunc.cc 2006-11-13 20:16:56 +04:00
@@ -1735,8 +1735,13 @@ bool Item_func_current_user::fix_fields(
if (Item_func_sysconst::fix_fields(thd, ref))
return TRUE;
- Security_context *ctx= (context->security_ctx
+ Security_context *ctx=
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+ (context->security_ctx
? context->security_ctx : thd->security_ctx);
+#else
+ thd->security_ctx;
+#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
return init(ctx->priv_user, ctx->priv_host);
}
--- 1.131/sql/share/errmsg.txt 2006-11-13 20:16:56 +04:00
+++ 1.132/sql/share/errmsg.txt 2006-11-13 20:16:56 +04:00
@@ -78,7 +78,7 @@ ER_CANT_CREATE_TABLE
dan "Kan ikke oprette tabellen '%-.64s' (Fejlkode: %d)"
nla "Kan tabel '%-.64s' niet aanmaken (Errcode: %d)"
- eng "Can't create table '%-.64s' (errno: %d)"
+ eng "Can't create table '%-.200s' (errno: %d)"
est "Ei suuda luua tabelit '%-.64s' (veakood: %d)"
@@ -574,7 +574,7 @@ ER_ERROR_ON_RENAME
nla "Fout bij het hernoemen van '%-.64s' naar '%-.64s' (Errcode: %d)"
- eng "Error on rename of '%-.64s' to '%-.64s' (errno: %d)"
+ eng "Error on rename of '%-.150s' to '%-.150s' (errno: %d)"
fre "Erreur en renommant '%-.64s' en '%-.64s' (Errcode: %d)"
--- 1.54/mysql-test/t/trigger.test 2006-11-13 20:16:56 +04:00
+++ 1.55/mysql-test/t/trigger.test 2006-11-13 20:16:56 +04:00
@@ -1140,6 +1140,7 @@ select trigger_schema, trigger_name, eve
# Trick which makes update of second .TRN file impossible
system echo dummy >$MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
system chmod 000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+--replace_result $MYSQLTEST_VARDIR . master-data/ ''
--error 1
rename table t1 to t2;
# 't1' should be still there and triggers should work correctly
--- 1.10/mysql-test/r/flush_block_commit.result 2006-11-13 20:16:56 +04:00
+++ 1.11/mysql-test/r/flush_block_commit.result 2006-11-13 20:16:56 +04:00
@@ -37,18 +37,3 @@ show create database test;
Database Create Database
test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */
drop table t1;
-create table t1 (a int) engine=innodb;
-reset master;
-set autocommit=0;
-insert t1 values (1);
-flush tables with read lock;
-show master status;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 102
- commit;
-show master status;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 102
-unlock tables;
-drop table t1;
-set autocommit=1;
--- 1.29/mysql-test/r/insert.result 2006-11-13 20:16:56 +04:00
+++ 1.30/mysql-test/r/insert.result 2006-11-13 20:16:56 +04:00
@@ -321,12 +321,6 @@ ERROR 42000: Column 'b' specified twice
INSERT INTO t1 (b,b) SELECT 0,0 ON DUPLICATE KEY UPDATE a = a + VALUES (a);
ERROR 42000: Column 'b' specified twice
drop table t1;
-create table t1 (n int);
-create view v1 as select * from t1;
-insert delayed into v1 values (1);
-ERROR HY000: 'test.v1' is not BASE TABLE
-drop table t1;
-drop view v1;
create table t1 (id int primary key, data int);
insert into t1 values (1, 1), (2, 2), (3, 3);
select row_count();
--- 1.43/mysql-test/r/insert_select.result 2006-11-13 20:16:56 +04:00
+++ 1.44/mysql-test/r/insert_select.result 2006-11-13 20:16:56 +04:00
@@ -705,103 +705,3 @@ use bug21774_1;
INSERT INTO bug21774_2.t1 SELECT t1.* FROM t1;
DROP DATABASE bug21774_1;
DROP DATABASE bug21774_2;
-CREATE DATABASE meow;
-CREATE TABLE table_target ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE TABLE table_target2 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE TABLE table_target3 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE VIEW view_target2 AS SELECT mexs_id,messzeit FROM table_target2;
-CREATE SQL SECURITY INVOKER VIEW view_target3 AS SELECT mexs_id,messzeit FROM table_target3;
-CREATE TABLE table_stations ( mexs_id VARCHAR(8), icao VARCHAR(4), country CHAR(2), PRIMARY KEY (mexs_id), UNIQUE KEY icao (icao), KEY country (country), CONSTRAINT stations_ibfk_8 FOREIGN KEY (country) REFERENCES countries (country) ON UPDATE CASCADE);
-INSERT INTO table_stations VALUES ('87654321','XXXX','YY');
-CREATE TABLE table_countries ( country CHAR(2), iso_short_en VARCHAR(64), PRIMARY KEY (country));
-INSERT INTO table_countries VALUES ('YY','Entenhausen');
-CREATE ALGORITHM=MERGE SQL SECURITY INVOKER VIEW view_stations AS select table_stations.mexs_id AS mexs_id, table_stations.icao AS icao, table_stations.country AS landescode from (table_stations join table_countries on((table_stations.country = table_countries.country)));
-CREATE TABLE table_source ( id varchar(4), datetime TIMESTAMP, PRIMARY KEY (id));
-INSERT INTO table_source VALUES ('XXXX','2006-07-12 07:50:00');
-GRANT SELECT ON table_source TO user20989@localhost;
-GRANT SELECT ON table_countries TO user20989@localhost;
-GRANT SELECT ON table_stations TO user20989@localhost;
-GRANT SELECT ON view_stations TO user20989@localhost;
-GRANT SELECT ON table_target TO user20989@localhost;
-GRANT SELECT ON table_target2 TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON view_target3 TO user20989@localhost;
-REPLACE INTO table_target
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN table_target AS old
-USING (mexs_id);
-ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target'
-REPLACE INTO view_target2
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'view_target2'
-REPLACE INTO view_target3
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target3 AS old
-USING (mexs_id);
-ERROR HY000: View 'meow.view_target3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
-GRANT INSERT,DELETE ON table_target TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON view_target2 TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON table_target3 TO user20989@localhost;
-REPLACE INTO table_target
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN table_target AS old
-USING (mexs_id);
-REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00');
-ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target2'
-REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00');
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-mexs_id messzeit
-87654321 2006-07-12 07:50:00
-REPLACE INTO view_target2
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-REPLACE INTO view_target3
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target3 AS old
-USING (mexs_id);
-SELECT * FROM table_target;
-mexs_id messzeit
-87654321 2006-07-12 07:50:00
-SELECT * FROM view_target2;
-mexs_id messzeit
-12X45Y78 2006-07-12 07:50:00
-87654321 2006-07-12 07:50:00
-SELECT * FROM view_target3;
-mexs_id messzeit
-87654321 2006-07-12 07:50:00
-DROP VIEW view_stations;
-DROP TABLE table_source;
-DROP TABLE table_countries;
-DROP TABLE table_stations;
-DROP TABLE table_target;
-DROP TABLE table_target2;
-DROP TABLE table_target3;
-DROP VIEW view_target2;
-DROP VIEW view_target3;
-DROP USER user20989@localhost;
-DROP DATABASE meow;
--- 1.15/mysql-test/t/delayed.test 2006-11-13 20:16:56 +04:00
+++ 1.16/mysql-test/t/delayed.test 2006-11-13 20:16:56 +04:00
@@ -1,10 +1,9 @@
+# delayed works differently in embedded server
+--source include/not_embedded.inc
#
# test of DELAYED insert and timestamps
# (Can't be tested with purify :( )
#
-
-# This tests not performed with embedded server
--- source include/not_embedded.inc
--disable_warnings
drop table if exists t1;
--- 1.149/mysql-test/t/innodb.test 2006-11-13 20:16:56 +04:00
+++ 1.150/mysql-test/t/innodb.test 2006-11-13 20:16:56 +04:00
@@ -2451,6 +2451,7 @@ drop table t1, t2, t3, t5, t6, t8, t9;
# bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID"
--error 1005
+--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ /
CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
#
--- 1.26/mysql-test/t/insert.test 2006-11-13 20:16:56 +04:00
+++ 1.27/mysql-test/t/insert.test 2006-11-13 20:16:56 +04:00
@@ -201,16 +201,6 @@ insert into t1 (b,b) select 1,2;
--error 1110
INSERT INTO t1 (b,b) SELECT 0,0 ON DUPLICATE KEY UPDATE a = a + VALUES (a);
drop table t1;
-# Test for INSERT DELAYED INTO a <view>
-# BUG#13683: INSERT DELAYED into a view creates an infinite loop
-#
-
-create table t1 (n int);
-create view v1 as select * from t1;
---error 1347
-insert delayed into v1 values (1);
-drop table t1;
-drop view v1;
#
# Test for values returned by ROW_COUNT() function
--- 1.35/mysql-test/t/join.test 2006-11-13 20:16:56 +04:00
+++ 1.36/mysql-test/t/join.test 2006-11-13 20:16:56 +04:00
@@ -520,6 +520,7 @@ select * from v1a join v1b on t1.b = t2.
#
# Bug #17523 natural join and information_schema
#
+# We mask out the Privileges column because it differs with embedded server
--replace_column 31 #
select * from information_schema.statistics join information_schema.columns
using(table_name,column_name) where table_name='user';
--- 1.121/libmysqld/lib_sql.cc 2006-11-13 20:16:56 +04:00
+++ 1.122/libmysqld/lib_sql.cc 2006-11-13 20:16:56 +04:00
@@ -584,6 +584,7 @@ void *create_embedded_thd(int client_fla
thd->set_time();
thd->init_for_queries();
thd->client_capabilities= client_flag;
+ thd->real_id= (pthread_t) thd;
thd->db= NULL;
thd->db_length= 0;
@@ -769,6 +770,8 @@ MYSQL_DATA *THD::alloc_new_dataset()
static void write_eof_packet(THD *thd)
{
+ if (!thd->mysql) // bootstrap file handling
+ return;
/*
The following test should never be true, but it's better to do it
because if 'is_fatal_error' is set the server is not going to execute
@@ -1027,6 +1030,9 @@ void Protocol_simple::prepare_for_resend
MYSQL_ROWS *cur;
MYSQL_DATA *data= thd->cur_data;
DBUG_ENTER("send_data");
+
+ if (!thd->mysql) // bootstrap file handling
+ DBUG_VOID_RETURN;
data->rows++;
if (!(cur= (MYSQL_ROWS *)alloc_root(alloc, sizeof(MYSQL_ROWS)+(field_count + 1) * sizeof(char *))))
--- 1.22/mysql-test/t/backup.test 2006-11-13 20:16:56 +04:00
+++ 1.23/mysql-test/t/backup.test 2006-11-13 20:16:56 +04:00
@@ -1,6 +1,3 @@
-# This test should work in embedded server after we fix mysqltest
--- source include/not_embedded.inc
-
#
# This test is a bit tricky as we can't use backup table to overwrite an old
# table
--- 1.18/mysql-test/t/status.test 2006-11-13 20:16:56 +04:00
+++ 1.19/mysql-test/t/status.test 2006-11-13 20:16:56 +04:00
@@ -1,3 +1,6 @@
+# embedded server causes different stat
+-- source include/not_embedded.inc
+
# PS causes different statistics
--disable_ps_protocol
--- 1.48.2.1/mysql-test/r/bdb.result 2006-11-13 20:16:56 +04:00
+++ 1.60/BitKeeper/deleted/.del-bdb.result 2006-11-13 20:16:56 +04:00
@@ -48,7 +48,7 @@ id parent_id level
15 102 2
update t1 set id=id+1000;
update t1 set id=1024 where id=1009;
-ERROR 23000: Duplicate entry '1024' for key 1
+ERROR 23000: Duplicate entry '1024' for key 'PRIMARY'
select * from t1;
id parent_id level
1001 100 0
@@ -270,7 +270,7 @@ n after commit
commit;
insert into t1 values (5);
insert into t1 values (4);
-ERROR 23000: Duplicate entry '4' for key 1
+ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
commit;
select n, "after commit" from t1;
n after commit
@@ -279,12 +279,46 @@ n after commit
set autocommit=1;
insert into t1 values (6);
insert into t1 values (4);
-ERROR 23000: Duplicate entry '4' for key 1
+ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
select n from t1;
n
4
5
6
+set autocommit=0;
+begin;
+savepoint `my_savepoint`;
+insert into t1 values (7);
+savepoint `savept2`;
+insert into t1 values (3);
+select n from t1;
+n
+3
+4
+5
+6
+7
+savepoint savept3;
+rollback to savepoint savept2;
+rollback to savepoint savept3;
+ERROR 42000: SAVEPOINT savept3 does not exist
+rollback to savepoint savept2;
+release savepoint `my_savepoint`;
+select n from t1;
+n
+4
+5
+6
+7
+rollback to savepoint `my_savepoint`;
+ERROR 42000: SAVEPOINT my_savepoint does not exist
+rollback to savepoint savept2;
+ERROR 42000: SAVEPOINT savept2 does not exist
+insert into t1 values (8);
+savepoint sv;
+commit;
+savepoint sv;
+set autocommit=1;
rollback;
drop table t1;
create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) engine=BDB;
@@ -309,7 +343,7 @@ drop table t1;
CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=bdb;
insert into t1 values ('pippo', 12);
insert into t1 values ('pippo', 12);
-ERROR 23000: Duplicate entry 'pippo' for key 1
+ERROR 23000: Duplicate entry 'pippo' for key 'PRIMARY'
delete from t1;
delete from t1 where id = 'pippo';
select * from t1;
@@ -464,9 +498,9 @@ UNIQUE ggid (ggid)
insert into t1 (ggid,passwd) values ('test1','xxx');
insert into t1 (ggid,passwd) values ('test2','yyy');
insert into t1 (ggid,passwd) values ('test2','this will fail');
-ERROR 23000: Duplicate entry 'test2' for key 2
+ERROR 23000: Duplicate entry 'test2' for key 'ggid'
insert into t1 (ggid,id) values ('this will fail',1);
-ERROR 23000: Duplicate entry '1' for key 1
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t1 where ggid='test1';
id ggid email passwd
1 test1 xxx
@@ -479,7 +513,7 @@ id ggid email passwd
replace into t1 (ggid,id) values ('this will work',1);
replace into t1 (ggid,passwd) values ('test2','this will work');
update t1 set id=100,ggid='test2' where id=1;
-ERROR 23000: Duplicate entry 'test2' for key 2
+ERROR 23000: Duplicate entry 'test2' for key 'ggid'
select * from t1;
id ggid email passwd
1 this will work
@@ -1013,7 +1047,7 @@ create table t1 (id int NOT NULL,id2 int
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
-ERROR 23000: Duplicate entry '1-1' for key 1
+ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
select id from t1;
id
0
@@ -1031,7 +1065,7 @@ insert into t1 values (0,0,0,'ABCDEFGHIJ
LOCK TABLES t1 WRITE;
begin;
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
-ERROR 23000: Duplicate entry '1-1' for key 1
+ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
select id from t1;
id
0
@@ -1332,40 +1366,40 @@ concat('*',v,'*',c,'*',t,'*')
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` varchar(10) default NULL,
- `c` char(10) default NULL,
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
create table t2 like t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `v` varchar(10) default NULL,
- `c` char(10) default NULL,
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
create table t3 select * from t1;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `v` varchar(10) default NULL,
- `c` char(10) default NULL,
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
alter table t1 modify c varchar(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` varchar(10) default NULL,
- `c` varchar(10) default NULL,
+ `v` varchar(10) DEFAULT NULL,
+ `c` varchar(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
alter table t1 modify v char(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` char(10) default NULL,
- `c` varchar(10) default NULL,
+ `v` char(10) DEFAULT NULL,
+ `c` varchar(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
alter table t1 modify t varchar(10);
@@ -1374,9 +1408,9 @@ Note 1265 Data truncated for column 't'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` char(10) default NULL,
- `c` varchar(10) default NULL,
- `t` varchar(10) default NULL
+ `v` char(10) DEFAULT NULL,
+ `c` varchar(10) DEFAULT NULL,
+ `t` varchar(10) DEFAULT NULL
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
select concat('*',v,'*',c,'*',t,'*') from t1;
concat('*',v,'*',c,'*',t,'*')
@@ -1387,8 +1421,8 @@ create table t1 (v varchar(10), c char(1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` varchar(10) default NULL,
- `c` char(10) default NULL,
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
`t` text,
KEY `v` (`v`),
KEY `c` (`c`),
@@ -1453,7 +1487,7 @@ explain select count(*) from t1 where v
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const # Using where
alter table t1 add unique(v);
-ERROR 23000: Duplicate entry '{ ' for key 1
+ERROR 23000: Duplicate entry '{ ' for key 'v_2'
alter table t1 add key(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
qq
@@ -1606,8 +1640,8 @@ alter table t1 modify v varchar(300), dr
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` varchar(300) default NULL,
- `c` char(10) default NULL,
+ `v` varchar(300) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
@@ -1686,8 +1720,8 @@ alter table t1 drop key v, add key v (v(
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` varchar(300) default NULL,
- `c` char(10) default NULL,
+ `v` varchar(300) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
@@ -1766,8 +1800,8 @@ alter table t1 modify v varchar(600), dr
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` varchar(600) default NULL,
- `c` char(10) default NULL,
+ `v` varchar(600) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
@@ -1813,16 +1847,16 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a ');
insert into t1 values ('a ');
-ERROR 23000: Duplicate entry 'a' for key 1
+ERROR 23000: Duplicate entry 'a' for key 'a'
alter table t1 modify a varchar(10);
insert into t1 values ('a '),('a '),('a '),('a ');
-ERROR 23000: Duplicate entry 'a ' for key 1
+ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
-ERROR 23000: Duplicate entry 'a ' for key 1
+ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
-ERROR 23000: Duplicate entry 'a ' for key 1
+ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
-ERROR 23000: Duplicate entry 'a ' for key 1
+ERROR 23000: Duplicate entry 'a ' for key 'a'
update t1 set a='a ' where a like 'a%';
select concat(a,'.') from t1;
concat(a,'.')
@@ -1844,8 +1878,8 @@ create table t1 (v varchar(10), c char(1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` varchar(10) default NULL,
- `c` char(10) default NULL,
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
`t` text,
KEY `v` (`v`(5)),
KEY `c` (`c`(5)),
@@ -1856,15 +1890,15 @@ create table t1 (v char(10) character se
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` char(10) character set utf8 default NULL
+ `v` char(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` varchar(10) default NULL,
- `c` char(10) default NULL
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
insert into t1 values('a','a'),('a ','a ');
select concat('*',v,'*',c,'*') from t1;
@@ -1906,7 +1940,7 @@ Note 1246 Converting column 'v' from VAR
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v` mediumtext character set utf8
+ `v` mediumtext CHARACTER SET utf8
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
drop table t1;
set storage_engine=MyISAM;
@@ -1929,3 +1963,22 @@ commit;
alter table t1 add primary key(a);
drop table t1;
End of 5.0 tests
+create table t1 (a int) engine=bdb;
+set session transaction isolation level repeatable read;
+set transaction isolation level serializable;
+begin;
+select @@tx_isolation;
+@@tx_isolation
+SERIALIZABLE
+insert into t1 values (1);
+set transaction isolation level read committed;
+ERROR 25001: Transaction isolation level can't be changed while a transaction is in progress
+rollback;
+begin;
+select @@tx_isolation;
+@@tx_isolation
+REPEATABLE-READ
+insert into t1 values (1);
+rollback;
+drop table t1;
+End of 5.1 tests
--- 1.50.1.4/mysql-test/t/bdb.test 2006-11-13 20:16:56 +04:00
+++ 1.58/BitKeeper/deleted/.del-bdb.test 2006-11-13 20:16:56 +04:00
@@ -147,6 +147,32 @@ insert into t1 values (6);
-- error 1062
insert into t1 values (4);
select n from t1;
+set autocommit=0;
+#
+# savepoints
+#
+begin;
+savepoint `my_savepoint`;
+insert into t1 values (7);
+savepoint `savept2`;
+insert into t1 values (3);
+select n from t1;
+savepoint savept3;
+rollback to savepoint savept2;
+--error 1305
+rollback to savepoint savept3;
+rollback to savepoint savept2;
+release savepoint `my_savepoint`;
+select n from t1;
+-- error 1305
+rollback to savepoint `my_savepoint`;
+--error 1305
+rollback to savepoint savept2;
+insert into t1 values (8);
+savepoint sv;
+commit;
+savepoint sv;
+set autocommit=1;
# nop
rollback;
drop table t1;
@@ -1020,3 +1046,24 @@ alter table t1 add primary key(a);
drop table t1;
--echo End of 5.0 tests
+
+#
+# Bug #7955: SET TRANSACTION ISIOLATION LEVEL lives longer than next
+# transaciton
+#
+create table t1 (a int) engine=bdb;
+set session transaction isolation level repeatable read;
+set transaction isolation level serializable;
+begin;
+select @@tx_isolation;
+insert into t1 values (1);
+--error ER_CANT_CHANGE_TX_ISOLATION
+set transaction isolation level read committed;
+rollback;
+begin;
+select @@tx_isolation;
+insert into t1 values (1);
+rollback;
+drop table t1;
+
+--echo End of 5.1 tests
| Thread |
|---|
| • bk commit into 5.1 tree (holyfoot:1.2328) | holyfoot | 13 Nov |