summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2021-01-14 16:55:35 +1100
committerDaniel Black <daniel@mariadb.org>2021-03-30 12:30:33 +1100
commit85b6a8180599e4d868f43af8c5926f13a1d4dcaa (patch)
tree0117f49ce35897e5d85507c1fb789daed55a112d
parent4d870b591dc6b96c38687c6e732423b49ad8765b (diff)
downloadmariadb-git-bb-10.2-MDEV-24586-danielblack-remove-mysql_to_mariadb.sql.tar.gz
MDEV-24586: remove mysql_to_mariadb.sqlbb-10.2-MDEV-24586-danielblack-remove-mysql_to_mariadb.sql
This script is unused and unmaintained. The logic is implemented in scripts/mysql_system_tables_fix.sql that forms part of mysql_upgrade Its components: alter table mysql.user drop column `password_last_changed`, drop column `password_lifetime`, drop column `account_locked`; has a friendlier migration path coming MDEV-24122 alter table mysql.user change column `authentication_string` `auth_string` text COLLATE utf8_bin NOT NULL; Already part of scripts/mysql_system_tables_fix.sql alter table mysql.user add column `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' after `user`, add column `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N' after `auth_string`; alter table mysql.user add column `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', add column `max_statement_time` decimal(12,6) NOT NULL DEFAULT '0.000000'; corrected in MDEV-23201 to be in the right order. update mysql.user set `password`=`auth_string`, plugin='' where plugin="mysql_native_password"; Is handled in server in the function acl_load.
-rw-r--r--scripts/CMakeLists.txt1
-rw-r--r--scripts/mysql_to_mariadb.sql22
2 files changed, 0 insertions, 23 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index e2fd853ce13..190d9f774fb 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -99,7 +99,6 @@ INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_db.sql
${CMAKE_CURRENT_SOURCE_DIR}/fill_help_tables.sql
${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_data_timezone.sql
- ${CMAKE_CURRENT_SOURCE_DIR}/mysql_to_mariadb.sql
${CMAKE_CURRENT_BINARY_DIR}/maria_add_gis_sp.sql
${CMAKE_CURRENT_BINARY_DIR}/maria_add_gis_sp_bootstrap.sql
${FIX_PRIVILEGES_SQL}
diff --git a/scripts/mysql_to_mariadb.sql b/scripts/mysql_to_mariadb.sql
deleted file mode 100644
index 4ee3f3a4214..00000000000
--- a/scripts/mysql_to_mariadb.sql
+++ /dev/null
@@ -1,22 +0,0 @@
--- Script that changes MySQL 5.7 privilege tables to MariaDB 10.x
--- This should be run first with
--- mysql --force mysql < mysql_to_mariadb.sql
--- It's ok to ignore any errors, as these usually means that the tables are
--- already fixed.
-
--- After this script s run, one should run at least:
--- mysql_upgrade --upgrade-system-tables
--- to get the other tables in the mysql database fixed.
-
--- Drop not existing columnms
-alter table mysql.user drop column `password_last_changed`, drop column `password_lifetime`, drop column `account_locked`;
-
--- Change existing columns
-alter table mysql.user change column `authentication_string` `auth_string` text COLLATE utf8_bin NOT NULL;
-
--- Add new columns
-alter table mysql.user add column `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' after `user`, add column `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N' after `auth_string`;
-alter table mysql.user add column `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', add column `max_statement_time` decimal(12,6) NOT NULL DEFAULT '0.000000';
-
--- Fix passwords
-update mysql.user set `password`=`auth_string`, plugin='' where plugin="mysql_native_password";