Database Development

How to make MySQL 8 alert when integer overflow happens during INSERT … ON DUPLICATE KEY?

Let’s consider we have a simple table with auto-incrementing integer ID and some unique column: CREATE TABLE `test` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `value` tinyint DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `value` (`value`) ); Imagine we inserted into it so many times that ID reached the maximum: INSERT INTO test VALUES (4294967294, […]

Mastering Development

Error when trying to set a DWORD value in the windows registry using C #

I’m writing code that sets a value in the Windows registry. when I set that value manually, it works as expected; when I want to set the value programmatically, however, it gives an error. The value I want to define is a DWORD value type that is “4294967295”. When I define that in the script, […]