diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2006-12-31 12:37:42 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2006-12-31 12:37:42 +0400 |
commit | ecf707e6e32d7e422087be75cfeeadcf9ecac62d (patch) | |
tree | f29ba6a7ce3abf7a761ab6b37addc856324d4d2e | |
parent | 05f0d52078ed065a0f6b16b83f218c4f072f9a47 (diff) | |
parent | 87308d980325fc06dbb51e105e13e48107d6cd77 (diff) | |
download | mariadb-git-ecf707e6e32d7e422087be75cfeeadcf9ecac62d.tar.gz |
Merge mysql.com:/d2/hf/clean/my41-clean
into mysql.com:/d2/hf/common/my41-common
sql/item_func.cc:
Auto merged
-rwxr-xr-x | libmysqld/examples/test-run | 2 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 4 | ||||
-rw-r--r-- | mysql-test/t/delayed.test | 2 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 3 | ||||
-rw-r--r-- | sql/item_func.cc | 4 |
5 files changed, 14 insertions, 1 deletions
diff --git a/libmysqld/examples/test-run b/libmysqld/examples/test-run index c7434488259..aea5b13eaba 100755 --- a/libmysqld/examples/test-run +++ b/libmysqld/examples/test-run @@ -10,7 +10,7 @@ top_builddir=../.. mysql_test_dir=$top_builddir/mysql-test examples=$top_builddir/libmysqld/examples -mysqltest=$examples/mysqltest +mysqltest=$examples/mysqltest_embedded datadir=$mysql_test_dir/var/master-data test_data_dir=test gdb=0 diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 804c4e001d2..7f9e2cced9e 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -521,6 +521,7 @@ void *create_embedded_thd(int client_flag) 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; @@ -819,6 +820,9 @@ void Protocol_simple::prepare_for_resend() DBUG_ENTER("send_data"); + if (!thd->mysql) // bootstrap file handling + DBUG_VOID_RETURN; + if (!data) { if (!(data= (MYSQL_DATA*) my_malloc(sizeof(MYSQL_DATA), diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test index a32eec536ea..961bcc946bf 100644 --- a/mysql-test/t/delayed.test +++ b/mysql-test/t/delayed.test @@ -1,3 +1,5 @@ +# delayed works differently in embedded server +--source include/not_embedded.inc # # test of DELAYED insert and timestamps # (Can't be tested with purify :( ) diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 3e53cadf76c..7e594c358f2 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1299,6 +1299,7 @@ drop table test_checksum; set foreign_key_checks=0; create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb; +--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / -- error 1005 create table t1(a char(10) primary key, b varchar(20)) engine = innodb; set foreign_key_checks=1; @@ -1309,6 +1310,7 @@ drop table t2; set foreign_key_checks=0; create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1; +--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / -- error 1005 create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8; set foreign_key_checks=1; @@ -1338,6 +1340,7 @@ drop table t2,t1; set foreign_key_checks=0; create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1; create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8; +--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / -- error 1025 rename table t3 to t1; set foreign_key_checks=1; diff --git a/sql/item_func.cc b/sql/item_func.cc index 117ae19137b..635c6b4c6d6 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2239,7 +2239,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); |