forked from pool/mariadb
9301fefeac
Copy from server:database/mariadb based on submit request 39217 from user -miska- OBS-URL: https://build.opensuse.org/request/show/39217 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mariadb?expand=0&rev=1
64 lines
4.5 KiB
Diff
64 lines
4.5 KiB
Diff
diff -Naru scripts/mysql_fix_privilege_tables.sql scripts/mysql_fix_privilege_tables.sql
|
|
--- scripts/mysql_fix_privilege_tables.sql 2008-11-14 18:03:14.000000000 +0100
|
|
+++ scripts/mysql_fix_privilege_tables.sql 2009-01-09 18:57:47.000000000 +0100
|
|
@@ -24,6 +24,17 @@
|
|
|
|
CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL, dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='MySQL plugins';
|
|
|
|
+-- Remember for later if plugin table already existed
|
|
+set @had_plugin_table= @@warning_count != 0;
|
|
+
|
|
+-- Install plugins by default if they didn't existed
|
|
+CREATE TEMPORARY TABLE tmp_plugin LIKE plugin;
|
|
+INSERT INTO tmp_plugin (name,dl) VALUES ('ARCHIVE','ha_archive.so');
|
|
+INSERT INTO tmp_plugin (name,dl) VALUES ('FEDERATED','ha_federated.so');
|
|
+INSERT INTO tmp_plugin (name,dl) VALUES ('BLACKHOLE','ha_blackhole.so');
|
|
+INSERT INTO tmp_plugin (name,dl) VALUES ('EXAMPLE','ha_example.so');
|
|
+INSERT INTO plugin SELECT * FROM tmp_plugin WHERE @had_plugin_table=0;
|
|
+DROP TABLE tmp_plugin;
|
|
|
|
CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
|
|
|
|
diff -Naru scripts/mysql_fix_privilege_tables_sql.c scripts/mysql_fix_privilege_tables_sql.c
|
|
--- scripts/mysql_fix_privilege_tables_sql.c 2008-11-14 18:03:19.000000000 +0100
|
|
+++ scripts/mysql_fix_privilege_tables_sql.c 2009-01-09 19:02:35.000000000 +0100
|
|
@@ -36,6 +36,17 @@
|
|
"\n "
|
|
"CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL, dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='MySQL plugins';\n "
|
|
"\n "
|
|
+"-- Remember for later if plugin table already existed\n "
|
|
+"set @had_plugin_table= @@warning_count != 0;\n "
|
|
+"\n "
|
|
+"-- Install plugins by default if they didn't existed\n "
|
|
+"CREATE TEMPORARY TABLE tmp_plugin LIKE plugin;\n "
|
|
+"INSERT INTO tmp_plugin (name,dl) VALUES ('ARCHIVE','ha_archive.so');\n "
|
|
+"INSERT INTO tmp_plugin (name,dl) VALUES ('FEDERATED','ha_federated.so');\n "
|
|
+"INSERT INTO tmp_plugin (name,dl) VALUES ('BLACKHOLE','ha_blackhole.so');\n "
|
|
+"INSERT INTO tmp_plugin (name,dl) VALUES ('EXAMPLE','ha_example.so');\n "
|
|
+"INSERT INTO plugin SELECT * FROM tmp_plugin WHERE @had_plugin_table=0;\n "
|
|
+"DROP TABLE tmp_plugin;\n "
|
|
"\n "
|
|
"CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';\n "
|
|
"\n "
|
|
diff -Naru scripts/mysql_system_tables.sql scripts/mysql_system_tables.sql
|
|
--- scripts/mysql_system_tables.sql 2008-11-14 17:37:05.000000000 +0100
|
|
+++ scripts/mysql_system_tables.sql 2009-01-09 19:00:35.000000000 +0100
|
|
@@ -24,6 +24,17 @@
|
|
|
|
CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL, dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='MySQL plugins';
|
|
|
|
+-- Remember for later if plugin table already existed
|
|
+set @had_plugin_table= @@warning_count != 0;
|
|
+
|
|
+-- Install plugins by default if they didn't existed
|
|
+CREATE TEMPORARY TABLE tmp_plugin LIKE plugin;
|
|
+INSERT INTO tmp_plugin (name,dl) VALUES ('ARCHIVE','ha_archive.so');
|
|
+INSERT INTO tmp_plugin (name,dl) VALUES ('FEDERATED','ha_federated.so');
|
|
+INSERT INTO tmp_plugin (name,dl) VALUES ('BLACKHOLE','ha_blackhole.so');
|
|
+INSERT INTO tmp_plugin (name,dl) VALUES ('EXAMPLE','ha_example.so');
|
|
+INSERT INTO plugin SELECT * FROM tmp_plugin WHERE @had_plugin_table=0;
|
|
+DROP TABLE tmp_plugin;
|
|
|
|
CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
|
|
|