summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2003-05-13 22:50:28 +0200
committerunknown <guilhem@mysql.com>2003-05-13 22:50:28 +0200
commit40e4b8d0cb1faf39acbfddc0e30f3e2d209bb4c2 (patch)
tree4c8a22e163b9ae0e547c23bacb1d8c2a93177192 /sql/item_create.cc
parent9f22d16669969dbbba5e9b1198e1623ef02c0289 (diff)
downloadmariadb-git-40e4b8d0cb1faf39acbfddc0e30f3e2d209bb4c2.tar.gz
Proper replication of CONNECTION_ID() and 4.1 PASSWORD() (bugs 177 and 344),
new test for this. sql/item_create.cc: Proper replication of CONNECTION_ID() (bug 177). This is just for replication; mysqlbinlog|mysql still does not work with CONNECTION_ID(), it will wait for row-level binlogging. sql/item_strfunc.cc: Proper replication of the new 4.1 PASSWORD() (bug 344)
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 23e4ce1d2b4..1e547a9c76e 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -84,8 +84,12 @@ Item *create_func_connection_id(void)
{
THD *thd=current_thd;
thd->lex.safe_to_cache_query=0;
- return new Item_int(NullS,(longlong) thd->thread_id,10);
-}
+ return new Item_int(NullS,(longlong)
+ ((thd->slave_thread) ?
+ thd->variables.pseudo_thread_id :
+ thd->thread_id),
+ 10);
+}
Item *create_func_conv(Item* a, Item *b, Item *c)
{