Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dveeden/udf_gettid

Get Thread Id function for MySQL
https://github.com/dveeden/udf_gettid

Last synced: about 1 month ago
JSON representation

Get Thread Id function for MySQL

Awesome Lists containing this project

README

        

Description
===========
An MySQL UDF to get the thread id on Linux. This is useful to move MySQL threads/connections to a Linux cgroup.

Installation
============

$ gcc -o udf_gettid.so udf_gettid.c `mysql_config --include` -shared -fPIC

mysql> CREATE FUNCTION gettid RETURNS INTEGER SONAME 'udf_gettid.so';

Example
=======

mysql> SELECT gettid();
+----------+
| gettid() |
+----------+
| 8877 |
+----------+