Skip to content

fix: Remove deprecated gnome-keyring code and add partition TABLESPAC… #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 8.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 5 additions & 19 deletions frontend/linux/workbench/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,8 @@

DEFAULT_LOG_DOMAIN("main")

#if defined(HAVE_GNOME_KEYRING) || defined(HAVE_OLD_GNOME_KEYRING)
extern "C" {
// gnome-keyring has been deprecated in favor of libsecret
// More informations can be found here https://mail.gnome.org/archives/commits-list/2013-October/msg08876.html
// Below defines will turn off deprecations and allow build with never Gnome until we will not move to libsecret.
#define GNOME_KEYRING_DEPRECATED
#define GNOME_KEYRING_DEPRECATED_FOR(x)
#include <gnome-keyring.h>
};
#ifdef HAVE_LIBSECRET_KEYRING
#include <libsecret/secret.h>
#endif
#include <X11/Xlib.h>

Expand Down Expand Up @@ -107,16 +100,9 @@ int main(int argc, char **argv) {
std::string user_data_dir = std::string(g_get_home_dir()).append("/.mysql/workbench");
base::Logger log(user_data_dir, getenv("MWB_LOG_TO_STDERR") != NULL);

#if defined(HAVE_GNOME_KEYRING) || defined(HAVE_OLD_GNOME_KEYRING)
if (getenv("WB_NO_GNOME_KEYRING"))
logInfo("WB_NO_GNOME_KEYRING environment variable has been set. Stored passwords will be lost once quit.\n");
else {
if (!gnome_keyring_is_available()) {
setenv("WB_NO_GNOME_KEYRING", "1", 1);
logError(
"Can't communicate with gnome-keyring, it's probably not running. Stored passwords will be lost once quit.\n");
}
}
#ifdef HAVE_LIBSECRET_KEYRING
if (getenv("WB_NO_KEYRING"))
logInfo("WB_NO_KEYRING environment variable has been set. Stored passwords will be lost once quit.\n");
#endif

wb::WBOptions wboptions(argv[0]);
Expand Down
4 changes: 2 additions & 2 deletions frontend/linux/workbench/mysql-workbench.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Uncomment the following line if you're having trouble with gnome-keyring lockups.
# Uncomment the following line if you're having trouble with keyring/libsecret lockups.
# This will cause passwords to be stored only temporarily for the session.
#WB_NO_GNOME_KEYRING=1
#WB_NO_KEYRING=1

# force disable the Mac style single menu hack in Ubuntu Unity
export UBUNTU_MENUPROXY=0
Expand Down
8 changes: 7 additions & 1 deletion modules/db.mysql/src/module_db_mysql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ namespace {
if (strlen(part->minRows().c_str()))
sql.append(" MIN_ROWS = ").append(base::escape_sql_string(part->minRows().c_str()));

// TODO: process TABLESPACE and NODEGROUP cluster-specific options
// Add TABLESPACE support (for NDB and InnoDB storage engines)
if (strlen(part->tableSpace().c_str()))
sql.append(" TABLESPACE = ").append(base::escape_sql_string(part->tableSpace().c_str()));

// Add NODEGROUP support (for NDB Cluster storage engine)
if (part->nodeGroupId() > 0)
sql.append(" NODEGROUP = ").append(std::to_string(part->nodeGroupId()))
}
};

Expand Down