You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

626 lines
27 KiB

Fix for MDEV-5547: Bad error message when moving very old .frm files to MariaDB 5.5. mysql_upgrade --help now also prints out --default options and variable values. mysql_upgrade now prints permission errors. mysql_upgrade doesn't print some non essential info if --silent is used. Added handler error message about incompatible versions Fixed that mysqlbug and mysql_install_db have the executable flag set. Removed executable flag for some non executable files. Changed in mysql_install_db askmonty.org to mariadb.com. Ensured that all client executables prints --default options the same way. Allow REPAIR ... USE_FRM for old .frm files if the are still compatible. Extended shown error for storage engine messages. client/mysql.cc: print_defaults() should be first (as in all other programs) client/mysql_upgrade.c: --help now also prints out --default options and variable values Print out error if wrong permissions Don't print info if --silent client/mysqladmin.cc: print_defaults() should be first (as in all other programs) client/mysqlbinlog.cc: Added print_defaults() to --help client/mysqlcheck.c: Added empty line in --help client/mysqlimport.c: Added empty line in --help client/mysqlshow.c: Made --help compatible client/mysqlslap.c: Made --help compatible client/mysqltest.cc: Added print_defaults() to --help include/handler_ername.h: Added handler error message include/my_base.h: Added handler error message mysql-test/r/mysql_upgrade.result: Updated results mysql-test/r/repair.result: Added test case for better error messages mysql-test/std_data/host_old.MYD: Added test case for better error messages mysql-test/std_data/host_old.MYI: Added test case for better error messages mysql-test/std_data/host_old.frm: Added test case for better error messages mysql-test/t/repair.test: Added test case for better error messages mysys/my_handler_errors.h: Added handler error message scripts/CMakeLists.txt: Fixed that mysqlbug and mysql_install_db have the executable flag set scripts/mysql_install_db.sh: askmonty.org -> mariadb.com sql/ha_partition.cc: Sometimes table_type() can be called for errors even if partition didn't manage to open any files sql/handler.cc: Write clear text for not handled, but defined error messages. sql/share/errmsg-utf8.txt: Extended shown error for storage engine messages sql/sql_admin.cc: Allow REPAIR ... USE_FRM for old .frm files if the are still compatible storage/myisam/ha_myisam.cc: Use new error message
12 years ago
Fixed build failures found by buildbot - Added suppression of warnings - Fixed some test cases BUILD/FINISH.sh: Added AM_EXTRA_MAKEFLAGS BUILD/SETUP.sh: Added option --extra-makeflags client/mysqldump.c: Added suppression mysql-test/r/mysql.result: Updated results mysql-test/r/mysql_upgrade.result: Updated results mysql-test/r/partition_innodb_plugin.result: Updated results mysql-test/r/partition_open_files_limit.result: Updated results mysql-test/r/symlink.result: Updated results mysql-test/suite/innodb/r/innodb-create-options.result: Updated results mysql-test/suite/innodb/t/innodb-create-options.test: Don't print error message (as it's varies on different system) mysql-test/t/mysql.test: Don't print error message (as it's varies on different system) mysql-test/t/mysql_upgrade.test: Fixed checking of error number mysql-test/t/partition_innodb_plugin.test: Don't print error message (as it's varies on different system) plugin/semisync/semisync_master.cc: Added suppression sql/ha_partition.cc: Added suppression sql/item_subselect.cc: Added suppression sql/multi_range_read.cc: Added suppression sql/sql_parse.cc: Added suppression sql/sql_select.cc: Added suppression storage/innobase/handler/ha_innodb.cc: Removed not used variable storage/maria/ma_delete.c: Added suppression storage/maria/ma_key_recover.c: Added suppression storage/maria/ma_write.c: Added suppression strings/ctype-ucs2.c: Added suppression support-files/compiler_warnings.supp: Added suppressions unittest/mysys/my_vsnprintf-t.c: Fixed test case with %M to also work on Solaris
14 years ago
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG System tables were not getting upgraded when mysql_upgrade was run with --skip-write-binlog option. (Same for --write-binlog.) Also, with this option, mysql_upgrade_info file was not getting created after the upgrade. mysql_upgrade makes use of mysql client tool in order to run upgrade scripts, while doing so it passes some of the command line options (used to start mysql_upgrade) directly to mysql client. The reason behind this bug being, some options like skip-write-binlog and upgrade-system-tables were being passed to mysql tool along with other options, and hence mysql execution failed due presence of these invalid options. Fixed this issue by filtering out the above mentioned options from the list of options that will be passed to mysql and mysqlcheck tools. However, since --write-binlog is supported by mysqlcheck, this option would be used explicitly while running mysqlcheck. (not part of patch, already there) Checking the contents of general log after the upgrade is not doable via an mtr test. So performed manual test. Added a test to verify the creation of mysql_upgrade_info. client/mysql_upgrade.c: Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG With this patch, --upgrade-system-tables and --write-binlog options will not be added to the list of options, used to start mysql and mysqlcheck tools. mysql-test/r/mysql_upgrade.result: Added a testcase for Bug#11827359. mysql-test/t/mysql_upgrade.test: Added a testcase for Bug#11827359.
14 years ago
14 years ago
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG System tables were not getting upgraded when mysql_upgrade was run with --skip-write-binlog option. (Same for --write-binlog.) Also, with this option, mysql_upgrade_info file was not getting created after the upgrade. mysql_upgrade makes use of mysql client tool in order to run upgrade scripts, while doing so it passes some of the command line options (used to start mysql_upgrade) directly to mysql client. The reason behind this bug being, some options like skip-write-binlog and upgrade-system-tables were being passed to mysql tool along with other options, and hence mysql execution failed due presence of these invalid options. Fixed this issue by filtering out the above mentioned options from the list of options that will be passed to mysql and mysqlcheck tools. However, since --write-binlog is supported by mysqlcheck, this option would be used explicitly while running mysqlcheck. (not part of patch, already there) Checking the contents of general log after the upgrade is not doable via an mtr test. So performed manual test. Added a test to verify the creation of mysql_upgrade_info. client/mysql_upgrade.c: Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG With this patch, --upgrade-system-tables and --write-binlog options will not be added to the list of options, used to start mysql and mysqlcheck tools. mysql-test/r/mysql_upgrade.result: Added a testcase for Bug#11827359. mysql-test/t/mysql_upgrade.test: Added a testcase for Bug#11827359.
14 years ago
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG System tables were not getting upgraded when mysql_upgrade was run with --skip-write-binlog option. (Same for --write-binlog.) Also, with this option, mysql_upgrade_info file was not getting created after the upgrade. mysql_upgrade makes use of mysql client tool in order to run upgrade scripts, while doing so it passes some of the command line options (used to start mysql_upgrade) directly to mysql client. The reason behind this bug being, some options like skip-write-binlog and upgrade-system-tables were being passed to mysql tool along with other options, and hence mysql execution failed due presence of these invalid options. Fixed this issue by filtering out the above mentioned options from the list of options that will be passed to mysql and mysqlcheck tools. However, since --write-binlog is supported by mysqlcheck, this option would be used explicitly while running mysqlcheck. (not part of patch, already there) Checking the contents of general log after the upgrade is not doable via an mtr test. So performed manual test. Added a test to verify the creation of mysql_upgrade_info. client/mysql_upgrade.c: Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG With this patch, --upgrade-system-tables and --write-binlog options will not be added to the list of options, used to start mysql and mysqlcheck tools. mysql-test/r/mysql_upgrade.result: Added a testcase for Bug#11827359. mysql-test/t/mysql_upgrade.test: Added a testcase for Bug#11827359.
14 years ago
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG System tables were not getting upgraded when mysql_upgrade was run with --skip-write-binlog option. (Same for --write-binlog.) Also, with this option, mysql_upgrade_info file was not getting created after the upgrade. mysql_upgrade makes use of mysql client tool in order to run upgrade scripts, while doing so it passes some of the command line options (used to start mysql_upgrade) directly to mysql client. The reason behind this bug being, some options like skip-write-binlog and upgrade-system-tables were being passed to mysql tool along with other options, and hence mysql execution failed due presence of these invalid options. Fixed this issue by filtering out the above mentioned options from the list of options that will be passed to mysql and mysqlcheck tools. However, since --write-binlog is supported by mysqlcheck, this option would be used explicitly while running mysqlcheck. (not part of patch, already there) Checking the contents of general log after the upgrade is not doable via an mtr test. So performed manual test. Added a test to verify the creation of mysql_upgrade_info. client/mysql_upgrade.c: Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG With this patch, --upgrade-system-tables and --write-binlog options will not be added to the list of options, used to start mysql and mysqlcheck tools. mysql-test/r/mysql_upgrade.result: Added a testcase for Bug#11827359. mysql-test/t/mysql_upgrade.test: Added a testcase for Bug#11827359.
14 years ago
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG System tables were not getting upgraded when mysql_upgrade was run with --skip-write-binlog option. (Same for --write-binlog.) Also, with this option, mysql_upgrade_info file was not getting created after the upgrade. mysql_upgrade makes use of mysql client tool in order to run upgrade scripts, while doing so it passes some of the command line options (used to start mysql_upgrade) directly to mysql client. The reason behind this bug being, some options like skip-write-binlog and upgrade-system-tables were being passed to mysql tool along with other options, and hence mysql execution failed due presence of these invalid options. Fixed this issue by filtering out the above mentioned options from the list of options that will be passed to mysql and mysqlcheck tools. However, since --write-binlog is supported by mysqlcheck, this option would be used explicitly while running mysqlcheck. (not part of patch, already there) Checking the contents of general log after the upgrade is not doable via an mtr test. So performed manual test. Added a test to verify the creation of mysql_upgrade_info. client/mysql_upgrade.c: Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG With this patch, --upgrade-system-tables and --write-binlog options will not be added to the list of options, used to start mysql and mysqlcheck tools. mysql-test/r/mysql_upgrade.result: Added a testcase for Bug#11827359. mysql-test/t/mysql_upgrade.test: Added a testcase for Bug#11827359.
14 years ago
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG System tables were not getting upgraded when mysql_upgrade was run with --skip-write-binlog option. (Same for --write-binlog.) Also, with this option, mysql_upgrade_info file was not getting created after the upgrade. mysql_upgrade makes use of mysql client tool in order to run upgrade scripts, while doing so it passes some of the command line options (used to start mysql_upgrade) directly to mysql client. The reason behind this bug being, some options like skip-write-binlog and upgrade-system-tables were being passed to mysql tool along with other options, and hence mysql execution failed due presence of these invalid options. Fixed this issue by filtering out the above mentioned options from the list of options that will be passed to mysql and mysqlcheck tools. However, since --write-binlog is supported by mysqlcheck, this option would be used explicitly while running mysqlcheck. (not part of patch, already there) Checking the contents of general log after the upgrade is not doable via an mtr test. So performed manual test. Added a test to verify the creation of mysql_upgrade_info. client/mysql_upgrade.c: Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG With this patch, --upgrade-system-tables and --write-binlog options will not be added to the list of options, used to start mysql and mysqlcheck tools. mysql-test/r/mysql_upgrade.result: Added a testcase for Bug#11827359. mysql-test/t/mysql_upgrade.test: Added a testcase for Bug#11827359.
14 years ago
14 years ago
14 years ago
  1. set sql_mode="";
  2. Run mysql_upgrade once
  3. Phase 1/7: Checking and upgrading mysql database
  4. Processing databases
  5. mysql
  6. mysql.column_stats OK
  7. mysql.columns_priv OK
  8. mysql.db OK
  9. mysql.event OK
  10. mysql.func OK
  11. mysql.global_priv OK
  12. mysql.gtid_slave_pos OK
  13. mysql.help_category OK
  14. mysql.help_keyword OK
  15. mysql.help_relation OK
  16. mysql.help_topic OK
  17. mysql.index_stats OK
  18. mysql.innodb_index_stats OK
  19. mysql.innodb_table_stats OK
  20. mysql.plugin OK
  21. mysql.proc OK
  22. mysql.procs_priv OK
  23. mysql.proxies_priv OK
  24. mysql.roles_mapping OK
  25. mysql.servers OK
  26. mysql.table_stats OK
  27. mysql.tables_priv OK
  28. mysql.time_zone OK
  29. mysql.time_zone_leap_second OK
  30. mysql.time_zone_name OK
  31. mysql.time_zone_transition OK
  32. mysql.time_zone_transition_type OK
  33. mysql.transaction_registry OK
  34. Phase 2/7: Installing used storage engines... Skipped
  35. Phase 3/7: Fixing views
  36. mysql.user OK
  37. Phase 4/7: Running 'mysql_fix_privilege_tables'
  38. Phase 5/7: Fixing table and database names
  39. Phase 6/7: Checking and upgrading tables
  40. Processing databases
  41. information_schema
  42. mtr
  43. mtr.global_suppressions OK
  44. mtr.test_suppressions OK
  45. performance_schema
  46. test
  47. Phase 7/7: Running 'FLUSH PRIVILEGES'
  48. OK
  49. Run it again - should say already completed
  50. This installation of MariaDB is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
  51. Force should run it regardless of whether it has been run before
  52. Phase 1/7: Checking and upgrading mysql database
  53. Processing databases
  54. mysql
  55. mysql.column_stats OK
  56. mysql.columns_priv OK
  57. mysql.db OK
  58. mysql.event OK
  59. mysql.func OK
  60. mysql.global_priv OK
  61. mysql.gtid_slave_pos OK
  62. mysql.help_category OK
  63. mysql.help_keyword OK
  64. mysql.help_relation OK
  65. mysql.help_topic OK
  66. mysql.index_stats OK
  67. mysql.innodb_index_stats OK
  68. mysql.innodb_table_stats OK
  69. mysql.plugin OK
  70. mysql.proc OK
  71. mysql.procs_priv OK
  72. mysql.proxies_priv OK
  73. mysql.roles_mapping OK
  74. mysql.servers OK
  75. mysql.table_stats OK
  76. mysql.tables_priv OK
  77. mysql.time_zone OK
  78. mysql.time_zone_leap_second OK
  79. mysql.time_zone_name OK
  80. mysql.time_zone_transition OK
  81. mysql.time_zone_transition_type OK
  82. mysql.transaction_registry OK
  83. Phase 2/7: Installing used storage engines... Skipped
  84. Phase 3/7: Fixing views
  85. mysql.user OK
  86. Phase 4/7: Running 'mysql_fix_privilege_tables'
  87. Phase 5/7: Fixing table and database names
  88. Phase 6/7: Checking and upgrading tables
  89. Processing databases
  90. information_schema
  91. mtr
  92. mtr.global_suppressions OK
  93. mtr.test_suppressions OK
  94. performance_schema
  95. test
  96. Phase 7/7: Running 'FLUSH PRIVILEGES'
  97. OK
  98. CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
  99. GRANT ALL ON *.* TO mysqltest1@'%';
  100. Run mysql_upgrade with password protected account
  101. Phase 1/7: Checking and upgrading mysql database
  102. Processing databases
  103. mysql
  104. mysql.column_stats OK
  105. mysql.columns_priv OK
  106. mysql.db OK
  107. mysql.event OK
  108. mysql.func OK
  109. mysql.global_priv OK
  110. mysql.gtid_slave_pos OK
  111. mysql.help_category OK
  112. mysql.help_keyword OK
  113. mysql.help_relation OK
  114. mysql.help_topic OK
  115. mysql.index_stats OK
  116. mysql.innodb_index_stats OK
  117. mysql.innodb_table_stats OK
  118. mysql.plugin OK
  119. mysql.proc OK
  120. mysql.procs_priv OK
  121. mysql.proxies_priv OK
  122. mysql.roles_mapping OK
  123. mysql.servers OK
  124. mysql.table_stats OK
  125. mysql.tables_priv OK
  126. mysql.time_zone OK
  127. mysql.time_zone_leap_second OK
  128. mysql.time_zone_name OK
  129. mysql.time_zone_transition OK
  130. mysql.time_zone_transition_type OK
  131. mysql.transaction_registry OK
  132. Phase 2/7: Installing used storage engines... Skipped
  133. Phase 3/7: Fixing views
  134. mysql.user OK
  135. Phase 4/7: Running 'mysql_fix_privilege_tables'
  136. Phase 5/7: Fixing table and database names
  137. Phase 6/7: Checking and upgrading tables
  138. Processing databases
  139. information_schema
  140. mtr
  141. mtr.global_suppressions OK
  142. mtr.test_suppressions OK
  143. performance_schema
  144. test
  145. Phase 7/7: Running 'FLUSH PRIVILEGES'
  146. OK
  147. DROP USER mysqltest1@'%';
  148. Version check failed. Got the following error when calling the 'mysql' command line client
  149. ERROR 1045 (28000): Access denied for user 'mysqltest1'@'localhost' (using password: YES)
  150. FATAL ERROR: Upgrade failed
  151. Run mysql_upgrade with a non existing server socket
  152. mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
  153. FATAL ERROR: Upgrade failed
  154. set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
  155. Phase 1/7: Checking and upgrading mysql database
  156. Processing databases
  157. mysql
  158. mysql.column_stats OK
  159. mysql.columns_priv OK
  160. mysql.db OK
  161. mysql.event OK
  162. mysql.func OK
  163. mysql.global_priv OK
  164. mysql.gtid_slave_pos OK
  165. mysql.help_category OK
  166. mysql.help_keyword OK
  167. mysql.help_relation OK
  168. mysql.help_topic OK
  169. mysql.index_stats OK
  170. mysql.innodb_index_stats OK
  171. mysql.innodb_table_stats OK
  172. mysql.plugin OK
  173. mysql.proc OK
  174. mysql.procs_priv OK
  175. mysql.proxies_priv OK
  176. mysql.roles_mapping OK
  177. mysql.servers OK
  178. mysql.table_stats OK
  179. mysql.tables_priv OK
  180. mysql.time_zone OK
  181. mysql.time_zone_leap_second OK
  182. mysql.time_zone_name OK
  183. mysql.time_zone_transition OK
  184. mysql.time_zone_transition_type OK
  185. mysql.transaction_registry OK
  186. Phase 2/7: Installing used storage engines... Skipped
  187. Phase 3/7: Fixing views
  188. mysql.user OK
  189. Phase 4/7: Running 'mysql_fix_privilege_tables'
  190. Phase 5/7: Fixing table and database names
  191. Phase 6/7: Checking and upgrading tables
  192. Processing databases
  193. information_schema
  194. mtr
  195. mtr.global_suppressions OK
  196. mtr.test_suppressions OK
  197. performance_schema
  198. test
  199. Phase 7/7: Running 'FLUSH PRIVILEGES'
  200. OK
  201. set GLOBAL sql_mode=default;
  202. #
  203. # Bug #41569 mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table
  204. # but does not set values.
  205. #
  206. CREATE PROCEDURE testproc() BEGIN END;
  207. UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
  208. UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
  209. UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
  210. Phase 1/7: Checking and upgrading mysql database
  211. Processing databases
  212. mysql
  213. mysql.column_stats OK
  214. mysql.columns_priv OK
  215. mysql.db OK
  216. mysql.event OK
  217. mysql.func OK
  218. mysql.global_priv OK
  219. mysql.gtid_slave_pos OK
  220. mysql.help_category OK
  221. mysql.help_keyword OK
  222. mysql.help_relation OK
  223. mysql.help_topic OK
  224. mysql.index_stats OK
  225. mysql.innodb_index_stats OK
  226. mysql.innodb_table_stats OK
  227. mysql.plugin OK
  228. mysql.proc OK
  229. mysql.procs_priv OK
  230. mysql.proxies_priv OK
  231. mysql.roles_mapping OK
  232. mysql.servers OK
  233. mysql.table_stats OK
  234. mysql.tables_priv OK
  235. mysql.time_zone OK
  236. mysql.time_zone_leap_second OK
  237. mysql.time_zone_name OK
  238. mysql.time_zone_transition OK
  239. mysql.time_zone_transition_type OK
  240. mysql.transaction_registry OK
  241. Phase 2/7: Installing used storage engines... Skipped
  242. Phase 3/7: Fixing views
  243. mysql.user OK
  244. Phase 4/7: Running 'mysql_fix_privilege_tables'
  245. Phase 5/7: Fixing table and database names
  246. Phase 6/7: Checking and upgrading tables
  247. Processing databases
  248. information_schema
  249. mtr
  250. mtr.global_suppressions OK
  251. mtr.test_suppressions OK
  252. performance_schema
  253. test
  254. Phase 7/7: Running 'FLUSH PRIVILEGES'
  255. OK
  256. CALL testproc();
  257. DROP PROCEDURE testproc;
  258. WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (latin1). Please verify if necessary.
  259. WARNING: NULL values of the 'collation_connection' column ('mysql.proc' table) have been updated with a default value (latin1_swedish_ci). Please verify if necessary.
  260. WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been updated with default values. Please verify if necessary.
  261. #
  262. # Bug #53613: mysql_upgrade incorrectly revokes
  263. # TRIGGER privilege on given table
  264. #
  265. GRANT USAGE ON *.* TO 'user3'@'%';
  266. GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
  267. Run mysql_upgrade with all privileges on a user
  268. Phase 1/7: Checking and upgrading mysql database
  269. Processing databases
  270. mysql
  271. mysql.column_stats OK
  272. mysql.columns_priv OK
  273. mysql.db OK
  274. mysql.event OK
  275. mysql.func OK
  276. mysql.global_priv OK
  277. mysql.gtid_slave_pos OK
  278. mysql.help_category OK
  279. mysql.help_keyword OK
  280. mysql.help_relation OK
  281. mysql.help_topic OK
  282. mysql.index_stats OK
  283. mysql.innodb_index_stats OK
  284. mysql.innodb_table_stats OK
  285. mysql.plugin OK
  286. mysql.proc OK
  287. mysql.procs_priv OK
  288. mysql.proxies_priv OK
  289. mysql.roles_mapping OK
  290. mysql.servers OK
  291. mysql.table_stats OK
  292. mysql.tables_priv OK
  293. mysql.time_zone OK
  294. mysql.time_zone_leap_second OK
  295. mysql.time_zone_name OK
  296. mysql.time_zone_transition OK
  297. mysql.time_zone_transition_type OK
  298. mysql.transaction_registry OK
  299. Phase 2/7: Installing used storage engines... Skipped
  300. Phase 3/7: Fixing views
  301. mysql.user OK
  302. Phase 4/7: Running 'mysql_fix_privilege_tables'
  303. Phase 5/7: Fixing table and database names
  304. Phase 6/7: Checking and upgrading tables
  305. Processing databases
  306. information_schema
  307. mtr
  308. mtr.global_suppressions OK
  309. mtr.test_suppressions OK
  310. performance_schema
  311. test
  312. Phase 7/7: Running 'FLUSH PRIVILEGES'
  313. OK
  314. SHOW GRANTS FOR 'user3'@'%';
  315. Grants for user3@%
  316. GRANT USAGE ON *.* TO 'user3'@'%'
  317. GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
  318. DROP USER 'user3'@'%';
  319. # End of 5.1 tests
  320. The --upgrade-system-tables option was used, user tables won't be touched.
  321. Phase 1/7: Checking and upgrading mysql database
  322. Processing databases
  323. mysql
  324. mysql.column_stats OK
  325. mysql.columns_priv OK
  326. mysql.db OK
  327. mysql.event OK
  328. mysql.func OK
  329. mysql.global_priv OK
  330. mysql.gtid_slave_pos OK
  331. mysql.help_category OK
  332. mysql.help_keyword OK
  333. mysql.help_relation OK
  334. mysql.help_topic OK
  335. mysql.index_stats OK
  336. mysql.innodb_index_stats OK
  337. mysql.innodb_table_stats OK
  338. mysql.plugin OK
  339. mysql.proc OK
  340. mysql.procs_priv OK
  341. mysql.proxies_priv OK
  342. mysql.roles_mapping OK
  343. mysql.servers OK
  344. mysql.table_stats OK
  345. mysql.tables_priv OK
  346. mysql.time_zone OK
  347. mysql.time_zone_leap_second OK
  348. mysql.time_zone_name OK
  349. mysql.time_zone_transition OK
  350. mysql.time_zone_transition_type OK
  351. mysql.transaction_registry OK
  352. Phase 2/7: Installing used storage engines... Skipped
  353. Phase 3/7: Fixing views... Skipped
  354. Phase 4/7: Running 'mysql_fix_privilege_tables'
  355. Phase 5/7: Fixing table and database names ... Skipped
  356. Phase 6/7: Checking and upgrading tables... Skipped
  357. Phase 7/7: Running 'FLUSH PRIVILEGES'
  358. OK
  359. #
  360. # Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
  361. # SKIP-WRITE-BINLOG
  362. #
  363. # Droping the previously created mysql_upgrade_info file..
  364. # Running mysql_upgrade with --skip-write-binlog..
  365. Phase 1/7: Checking and upgrading mysql database
  366. Processing databases
  367. mysql
  368. mysql.column_stats OK
  369. mysql.columns_priv OK
  370. mysql.db OK
  371. mysql.event OK
  372. mysql.func OK
  373. mysql.global_priv OK
  374. mysql.gtid_slave_pos OK
  375. mysql.help_category OK
  376. mysql.help_keyword OK
  377. mysql.help_relation OK
  378. mysql.help_topic OK
  379. mysql.index_stats OK
  380. mysql.innodb_index_stats OK
  381. mysql.innodb_table_stats OK
  382. mysql.plugin OK
  383. mysql.proc OK
  384. mysql.procs_priv OK
  385. mysql.proxies_priv OK
  386. mysql.roles_mapping OK
  387. mysql.servers OK
  388. mysql.table_stats OK
  389. mysql.tables_priv OK
  390. mysql.time_zone OK
  391. mysql.time_zone_leap_second OK
  392. mysql.time_zone_name OK
  393. mysql.time_zone_transition OK
  394. mysql.time_zone_transition_type OK
  395. mysql.transaction_registry OK
  396. Phase 2/7: Installing used storage engines... Skipped
  397. Phase 3/7: Fixing views
  398. mysql.user OK
  399. Phase 4/7: Running 'mysql_fix_privilege_tables'
  400. Phase 5/7: Fixing table and database names
  401. Phase 6/7: Checking and upgrading tables
  402. Processing databases
  403. information_schema
  404. mtr
  405. mtr.global_suppressions OK
  406. mtr.test_suppressions OK
  407. performance_schema
  408. test
  409. Phase 7/7: Running 'FLUSH PRIVILEGES'
  410. OK
  411. #
  412. # Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR
  413. #
  414. Run mysql_upgrade with unauthorized access
  415. Version check failed. Got the following error when calling the 'mysql' command line client
  416. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  417. FATAL ERROR: Upgrade failed
  418. #
  419. # MDEV-4332 Increase username length from 16 characters
  420. # MDEV-6068, MDEV-6178 mysql_upgrade breaks databases with long user names
  421. #
  422. connection default;
  423. GRANT SELECT ON mysql.* TO very_long_user_name_number_1;
  424. GRANT SELECT ON mysql.* TO very_long_user_name_number_2;
  425. GRANT ALL ON *.* TO even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost WITH GRANT OPTION;
  426. GRANT INSERT ON mysql.user TO very_long_user_name_number_1;
  427. GRANT INSERT ON mysql.user TO very_long_user_name_number_2;
  428. GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_1;
  429. GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_2;
  430. CREATE PROCEDURE test.pr() BEGIN END;
  431. Phase 1/7: Checking and upgrading mysql database
  432. Processing databases
  433. mysql
  434. mysql.column_stats OK
  435. mysql.columns_priv OK
  436. mysql.db OK
  437. mysql.event OK
  438. mysql.func OK
  439. mysql.global_priv OK
  440. mysql.gtid_slave_pos OK
  441. mysql.help_category OK
  442. mysql.help_keyword OK
  443. mysql.help_relation OK
  444. mysql.help_topic OK
  445. mysql.index_stats OK
  446. mysql.innodb_index_stats OK
  447. mysql.innodb_table_stats OK
  448. mysql.plugin OK
  449. mysql.proc OK
  450. mysql.procs_priv OK
  451. mysql.proxies_priv OK
  452. mysql.roles_mapping OK
  453. mysql.servers OK
  454. mysql.table_stats OK
  455. mysql.tables_priv OK
  456. mysql.time_zone OK
  457. mysql.time_zone_leap_second OK
  458. mysql.time_zone_name OK
  459. mysql.time_zone_transition OK
  460. mysql.time_zone_transition_type OK
  461. mysql.transaction_registry OK
  462. Phase 2/7: Installing used storage engines... Skipped
  463. Phase 3/7: Fixing views
  464. mysql.user OK
  465. Phase 4/7: Running 'mysql_fix_privilege_tables'
  466. Phase 5/7: Fixing table and database names
  467. Phase 6/7: Checking and upgrading tables
  468. Processing databases
  469. information_schema
  470. mtr
  471. mtr.global_suppressions OK
  472. mtr.test_suppressions OK
  473. performance_schema
  474. test
  475. Phase 7/7: Running 'FLUSH PRIVILEGES'
  476. OK
  477. SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
  478. definer
  479. even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost
  480. SELECT grantor FROM mysql.tables_priv WHERE db = 'mysql' AND table_name = 'user';
  481. grantor
  482. even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost
  483. even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost
  484. DROP USER very_long_user_name_number_1, very_long_user_name_number_2, even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost;
  485. DROP PROCEDURE test.pr;
  486. use test;
  487. call mtr.add_suppression('Column last_update in table `mysql`.`innodb_table_stats` is INT NOT NULL but should be');
  488. alter table mysql.innodb_table_stats modify last_update int not null;
  489. create table extralongname_extralongname_extralongname_extralongname_ext (
  490. id int(10) unsigned not null,
  491. created_date date not null,
  492. created timestamp not null,
  493. primary key (created,id,created_date)
  494. ) engine=innodb stats_persistent=1 default charset=latin1
  495. partition by range (year(created_date))
  496. subpartition by hash (month(created_date))
  497. subpartitions 2 (
  498. partition p2007 values less than (2008),
  499. partition p2008 values less than (2009)
  500. );
  501. select length(table_name) from mysql.innodb_table_stats;
  502. length(table_name)
  503. 79
  504. 79
  505. 79
  506. 79
  507. drop table extralongname_extralongname_extralongname_extralongname_ext;
  508. # End of 10.0 tests
  509. set sql_mode=default;
  510. # Droping the previously created mysql_upgrade_info file..
  511. create table test.t1(a int) engine=MyISAM;
  512. # Trying to enforce InnoDB for all tables
  513. SET GLOBAL enforce_storage_engine=InnoDB;
  514. Phase 1/7: Checking and upgrading mysql database
  515. Processing databases
  516. mysql
  517. mysql.column_stats OK
  518. mysql.columns_priv OK
  519. mysql.db OK
  520. mysql.event OK
  521. mysql.func OK
  522. mysql.global_priv OK
  523. mysql.gtid_slave_pos OK
  524. mysql.help_category OK
  525. mysql.help_keyword OK
  526. mysql.help_relation OK
  527. mysql.help_topic OK
  528. mysql.index_stats OK
  529. mysql.innodb_index_stats OK
  530. mysql.innodb_table_stats OK
  531. mysql.plugin OK
  532. mysql.proc OK
  533. mysql.procs_priv OK
  534. mysql.proxies_priv OK
  535. mysql.roles_mapping OK
  536. mysql.servers OK
  537. mysql.table_stats OK
  538. mysql.tables_priv OK
  539. mysql.time_zone OK
  540. mysql.time_zone_leap_second OK
  541. mysql.time_zone_name OK
  542. mysql.time_zone_transition OK
  543. mysql.time_zone_transition_type OK
  544. mysql.transaction_registry OK
  545. Phase 2/7: Installing used storage engines... Skipped
  546. Phase 3/7: Fixing views
  547. mysql.user OK
  548. Phase 4/7: Running 'mysql_fix_privilege_tables'
  549. Phase 5/7: Fixing table and database names
  550. Phase 6/7: Checking and upgrading tables
  551. Processing databases
  552. information_schema
  553. mtr
  554. mtr.global_suppressions OK
  555. mtr.test_suppressions OK
  556. performance_schema
  557. test
  558. test.t1 OK
  559. Phase 7/7: Running 'FLUSH PRIVILEGES'
  560. OK
  561. # Should return 2
  562. SELECT count(*) FROM information_schema.tables where ENGINE="InnoDB";
  563. count(*)
  564. 3
  565. SHOW CREATE TABLE test.t1;
  566. Table Create Table
  567. t1 CREATE TABLE `t1` (
  568. `a` int(11) DEFAULT NULL
  569. ) ENGINE=MyISAM DEFAULT CHARSET=latin1
  570. DROP TABLE test.t1;
  571. SET GLOBAL enforce_storage_engine=NULL;
  572. # End of 10.1 tests
  573. # End of 10.2 tests
  574. #
  575. # Ensure that mysql_upgrade correctly sets truncate_versioning_priv
  576. # on upgrade from 10.2
  577. #
  578. drop view mysql.user_bak;
  579. CREATE USER 'user3'@'%';
  580. GRANT USAGE ON *.* TO 'user3'@'%';
  581. GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
  582. alter table mysql.user drop column Delete_history_priv;
  583. alter table mysql.db drop column Delete_history_priv;
  584. Run mysql_upgrade with all privileges on a user
  585. flush privileges;
  586. SHOW GRANTS FOR 'user3'@'%';
  587. Grants for user3@%
  588. GRANT USAGE ON *.* TO 'user3'@'%'
  589. GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
  590. DROP USER 'user3'@'%';
  591. update mysql.db set Delete_history_priv='Y' where db like 'test%';
  592. drop table mysql.global_priv;
  593. rename table mysql.global_priv_bak to mysql.global_priv;
  594. # End of 10.3 tests
  595. drop view mysql.user_bak;
  596. create user 'user3'@'localhost' identified with mysql_native_password as password('a_password');
  597. show create user user3@localhost;
  598. CREATE USER for user3@localhost
  599. CREATE USER 'user3'@'localhost' IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA'
  600. update mysql.user set password=authentication_string, authentication_string='' where user='user3';
  601. select password,plugin,authentication_string from mysql.user where user='user3';
  602. password plugin authentication_string
  603. *5DC1D11F45824A9DD613961F05C1EC1E7A1601AA mysql_native_password
  604. flush privileges;
  605. show create user user3@localhost;
  606. CREATE USER for user3@localhost
  607. CREATE USER 'user3'@'localhost' IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA' PASSWORD EXPIRE NEVER
  608. connect con1,localhost,user3,a_password;
  609. select current_user();
  610. current_user()
  611. user3@localhost
  612. disconnect con1;
  613. connection default;
  614. # mysql_upgrade --force --silent 2>&1
  615. show create user user3@localhost;
  616. CREATE USER for user3@localhost
  617. CREATE USER 'user3'@'localhost' IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA'
  618. connect con1,localhost,user3,a_password;
  619. select current_user();
  620. current_user()
  621. user3@localhost
  622. disconnect con1;
  623. connection default;
  624. drop user user3@localhost;
  625. drop table mysql.global_priv;
  626. rename table mysql.global_priv_bak to mysql.global_priv;