[MDEV-6448] Unsigned numbers as default Created: 2014-07-16  Updated: 2014-09-05  Due: 2014-08-21  Resolved: 2014-09-05

Status: Closed
Project: MariaDB Server
Component/s: None
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Andre Schmidt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

Add the ability to set numbers to be unsigned by default.



 Comments   
Comment by Sergei Golubchik [ 2014-07-21 ]

What do you mean?

Comment by Andre Schmidt [ 2014-07-22 ]

Couldn't find the mariadb docs for this, so i assume it's still the same as in mysql:

"Numeric data types that permit the UNSIGNED attribute also permit SIGNED. However, these data types are signed by default, so the SIGNED attribute has no effect."
http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html

So the ability to change this default to UNSIGNED by adding an option in runtime config would be nice.

ps. would also be interesting to know why is SIGNED the upstream default.

Comment by Sergei Golubchik [ 2014-08-05 ]

SIGNED is the default, because it's what the SQL standard dictates. While the standard does not explicitly use "SIGNED" or "UNSIGNED" keywords, it does specify that

For every numeric type, the least value is less than zero and the greatest value is greater than zero.

which means, all numeric types must be signed. "UNSIGNED" keyword is MySQL/MariaDB extension.

Generated at Thu Feb 08 07:11:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.