diff options
author | unknown <bell@sanja.is.com.ua> | 2006-04-14 02:02:28 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2006-04-14 02:02:28 +0300 |
commit | 8dc06e0f064194489ab5cb56b11537a822ad844c (patch) | |
tree | e1c43c8fa31928e304ac689c9613ee575287debe /sql/item_func.cc | |
parent | 41c0a5a744deb10eb10b080968172b42000d7fa6 (diff) | |
parent | 7069599748259e59353bce21e8b5ae7cd4b8ff44 (diff) | |
download | mariadb-git-8dc06e0f064194489ab5cb56b11537a822ad844c.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
sql/item_func.cc:
Auto merged
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index e22a7b45f33..4bdb62c6e7a 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -559,6 +559,31 @@ String *Item_int_func::val_str(String *str) } +void Item_func_connection_id::fix_length_and_dec() +{ + Item_int_func::fix_length_and_dec(); + max_length= 10; +} + + +bool Item_func_connection_id::fix_fields(THD *thd, Item **ref) +{ + if (Item_int_func::fix_fields(thd, ref)) + return TRUE; + + /* + To replicate CONNECTION_ID() properly we should use + pseudo_thread_id on slave, which contains the value of thread_id + on master. + */ + value= ((thd->slave_thread) ? + thd->variables.pseudo_thread_id : + thd->thread_id); + + return FALSE; +} + + /* Check arguments here to determine result's type for a numeric function of two arguments. |