summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-06-28 22:01:55 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-28 22:01:55 +0200
commit3361aee591b1eb8c676f60887ffc535cd509890a (patch)
tree54a65f83ba7d9293e6f8e8281ad920fbae6eb823 /plugin
parent6ce20fb2b9fe57330c797694b9dbea4028f40d7c (diff)
parent0fdb17e6c3f50ae22eb97b6363bcbd8b0cd9e040 (diff)
downloadmariadb-git-3361aee591b1eb8c676f60887ffc535cd509890a.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'plugin')
-rw-r--r--plugin/feedback/url_http.cc1
-rw-r--r--plugin/metadata_lock_info/metadata_lock_info.cc10
-rw-r--r--plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result4
-rw-r--r--plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/table_metadata_lock.result2
-rw-r--r--plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result2
-rw-r--r--plugin/metadata_lock_info/mysql-test/metadata_lock_info/t/global_read_lock.test1
6 files changed, 7 insertions, 13 deletions
diff --git a/plugin/feedback/url_http.cc b/plugin/feedback/url_http.cc
index d04ff6fa9d5..cec3f60505c 100644
--- a/plugin/feedback/url_http.cc
+++ b/plugin/feedback/url_http.cc
@@ -190,6 +190,7 @@ int Url_http::send(const char* data, size_t data_length)
break;
closesocket(fd);
+ fd= INVALID_SOCKET;
}
freeaddrinfo(addrs);
diff --git a/plugin/metadata_lock_info/metadata_lock_info.cc b/plugin/metadata_lock_info/metadata_lock_info.cc
index addac713032..6a9f6ef3f6c 100644
--- a/plugin/metadata_lock_info/metadata_lock_info.cc
+++ b/plugin/metadata_lock_info/metadata_lock_info.cc
@@ -81,25 +81,17 @@ int i_s_metadata_lock_info_fill_row(
THD *thd = param->thd;
TABLE *table = param->table;
DBUG_ENTER("i_s_metadata_lock_info_fill_row");
- MDL_request mdl_request;
- enum_mdl_duration mdl_duration;
MDL_context *mdl_ctx = mdl_ticket->get_ctx();
enum_mdl_type mdl_ticket_type = mdl_ticket->get_type();
MDL_key *mdl_key = mdl_ticket->get_key();
MDL_key::enum_mdl_namespace mdl_namespace = mdl_key->mdl_namespace();
- mdl_request.init(mdl_key, mdl_ticket_type, MDL_STATEMENT);
- mdl_ctx->find_ticket(&mdl_request, &mdl_duration);
table->field[0]->store((longlong) mdl_ctx->get_thread_id(), TRUE);
table->field[1]->set_notnull();
table->field[1]->store(
metadata_lock_info_lock_mode[(int) mdl_ticket_type].str,
metadata_lock_info_lock_mode[(int) mdl_ticket_type].length,
system_charset_info);
- table->field[2]->set_notnull();
- table->field[2]->store(
- metadata_lock_info_duration[(int) mdl_duration].str,
- metadata_lock_info_duration[(int) mdl_duration].length,
- system_charset_info);
+ table->field[2]->set_null();
table->field[3]->set_notnull();
table->field[3]->store(
metadata_lock_info_lock_name[(int) mdl_namespace].str,
diff --git a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result
index 9840aeecf97..5803d7d1290 100644
--- a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result
+++ b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/global_read_lock.result
@@ -3,8 +3,8 @@ lock_mode lock_duration lock_type table_schema table_name
FLUSH TABLES WITH READ LOCK;
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
lock_mode lock_duration lock_type table_schema table_name
-MDL_SHARED MDL_EXPLICIT Global read lock
-MDL_SHARED MDL_EXPLICIT Commit lock
+MDL_SHARED NULL Commit lock
+MDL_SHARED NULL Global read lock
UNLOCK TABLES;
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
lock_mode lock_duration lock_type table_schema table_name
diff --git a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/table_metadata_lock.result b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/table_metadata_lock.result
index 280c8284c54..1b76b9e8222 100644
--- a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/table_metadata_lock.result
+++ b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/table_metadata_lock.result
@@ -6,7 +6,7 @@ SELECT * FROM t1;
a
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
lock_mode lock_duration lock_type table_schema table_name
-MDL_SHARED_READ MDL_TRANSACTION Table metadata lock test t1
+MDL_SHARED_READ NULL Table metadata lock test t1
ROLLBACK;
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
lock_mode lock_duration lock_type table_schema table_name
diff --git a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result
index e1d690b566c..34d238cb43b 100644
--- a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result
+++ b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/r/user_lock.result
@@ -5,7 +5,7 @@ GET_LOCK('LOCK1',0)
1
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
lock_mode lock_duration lock_type table_schema table_name
-MDL_SHARED_NO_WRITE MDL_EXPLICIT User lock LOCK1
+MDL_SHARED_NO_WRITE NULL User lock LOCK1
SELECT RELEASE_LOCK('LOCK1');
RELEASE_LOCK('LOCK1')
1
diff --git a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/t/global_read_lock.test b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/t/global_read_lock.test
index f221191255e..103050e3fb8 100644
--- a/plugin/metadata_lock_info/mysql-test/metadata_lock_info/t/global_read_lock.test
+++ b/plugin/metadata_lock_info/mysql-test/metadata_lock_info/t/global_read_lock.test
@@ -1,5 +1,6 @@
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
FLUSH TABLES WITH READ LOCK;
+--sorted_result
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;
UNLOCK TABLES;
SELECT lock_mode, lock_duration, lock_type, table_schema, table_name FROM information_schema.metadata_lock_info;