summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorguilhem@mysql.com <>2003-05-13 22:50:28 +0200
committerguilhem@mysql.com <>2003-05-13 22:50:28 +0200
commitda0e28b7d6f7a1f1c26c22327a2217ee2a23c82d (patch)
tree4c8a22e163b9ae0e547c23bacb1d8c2a93177192 /sql/item_create.cc
parent60dfb25be3806eefb26504fdf17a0ba1fcb11673 (diff)
downloadmariadb-git-da0e28b7d6f7a1f1c26c22327a2217ee2a23c82d.tar.gz
Proper replication of CONNECTION_ID() and 4.1 PASSWORD() (bugs 177 and 344),
new test for this.
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)
{