Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7639

Question about using embedded db with threads

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Embedded Server
    • 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 eventloop listing to the common signals (SIGUSR1, SIGINT, SIGHUP, SIGCHILD) and the signalhandler 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.

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                stefbon stefbon
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: