MySQL Forums
Forum List  »  MySQL Shell

MySQL Upgrade Checker issue
Posted by: Nick Nick
Date: April 02, 2024 05:29PM

I'm getting a lot of spurious warnings in using the migration checker on my 5.7 DB (moving up to 8.3)... Here is just one example;

mydb.quotedJobs.jobCreated - column has zero default value: 0000-00-00
00:00:00

| quotedJobs | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `quotedJobs` AS select `quotes`.`job` AS `jobId`,`quotes`.`created` AS `quoteCreated` on((`quotes`.`provider` = `providers`.`id`))) left join `providerRatings` on((`quotes`.`provider` = `providerRatings`.`providerId`))) | utf8mb4 | utf8mb4_general_ci |

The problematic field originates from the `jobs` table (also reduced for simplicity);

| jobs | CREATE TABLE `jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `createdNdx` (`created`) USING BTREE,
) ENGINE=InnoDB AUTO_INCREMENT=2891 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC |

There doesn’t seem to be any risk of a zero-date being created, given the USE of DEFAULT. I can also confirm there is not a single zero-date in the entire DB… however the checker still hundreds of these warnings.

Is this a bug, or is it expected behaviour? Presumably, I can simply ignore them, as I don't see there being any risk of a zero date ever being entered, unless by an intentionally and deliberate INSERT by a dev.

I'd prefer to reduce my warnings to zero, if possible, but I don't see how in this particular instance.

Thanks for any help in this matter. N

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL Upgrade Checker issue
251
April 02, 2024 05:29PM
143
April 02, 2024 05:33PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.