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

Question about using embedded db with threads

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            stefbon stefbon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.