[MDEV-7639] Question about using embedded db with threads Created: 2015-02-26  Updated: 2015-10-31  Resolved: 2015-10-31

Status: Closed
Project: MariaDB Server
Component/s: Embedded Server
Fix Version/s: N/A

Type: Task Priority: Minor
Reporter: stefbon Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

Hi,

I'm using the embedded database for a backup service. I've compiled version mariadb 10.0.15 with options

-DWITH_EMBEDDED_SERVER=ON
-DWITH_EMBEDDED_SHARED_LIBRARY=ON

and linked my fuse backup program with mysql_config --libmysqld-libs

Futher the db is initialized:

int initialize_db()
{
    unsigned int len0=strlen("--datadir=/mysqldb") + fs_options.base.len + 2;
    char path0[len0];
    unsigned int len1=strlen("--thread_handling=no-threads") + 1;
    char path1[len1];
 
    if (snprintf(path0, len0, "--datadir=%s/mysqldb", fs_options.base.path)>0 && snprintf(path1, len1, "--thread_handling=no-threads")>0) {
 
        server_options[1]=path0;
        server_options[2]=path1;
 
        return mysql_library_init(num_options, server_options, server_groups);
 
    }
 
    return -1;
}

Here I've set the thread_handling to no-threads, but this does not change the behaviour when setting it to one thread per connection.

When I start my fuse backup program, I get a lot of threads, which I do not want. I have a thread pool of my own.(there are +- 20 threads extra).

Futher it looks like sending signals does not anymore like it did. I've got and event loop listing to the common signals (SIGUSR1, SIGINT, SIGHUP, SIGCHILD) and the signal handler I'm using is never activated.

How can I change the behaviour of threads which are created, or is this just required for a mysql db and thus standard behaviour?

Stef

And I'm asking here cause I did not find a forum or anything else.



 Comments   
Comment by Sergei Golubchik [ 2015-10-31 ]

This is neither a bug nor a feature request. Please ask your questions as described here:

Generated at Thu Feb 08 07:21:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.