zvibo / common-schema

Automatically exported from code.google.com/p/common-schema
0 stars 0 forks source link

Error in Documentation for auto_increments_columns #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of common_schema are you using? (specify
revision+distribution)
1.2.2

Which component is failing? (specify the view, function, etc.)
Documentation for
auto_increment_columns

What is the expected output? What do you see instead?
In documentation it says
"is_signed: 1 if type is SIGNED, 0 if UNSIGNED"

While but if you load the view and query it puts a 1 for unsigned and 0 for 
signed in the "is_signed" column

select * from auto_increment_columns where is_signed = 1 limit 1\G
  TABLE_SCHEMA: sanitized
          TABLE_NAME: sanitized 
         COLUMN_NAME: sanitized
           DATA_TYPE: int
         COLUMN_TYPE: int(5) unsigned
           is_signed: 1
           max_value: 4294967295
      AUTO_INCREMENT: 8
auto_increment_ratio: 0.0000

select * from auto_increment_columns where is_signed = 0 limit 1\G
*************************** 1. row ***************************
        TABLE_SCHEMA: sanitized2
          TABLE_NAME: sanitized2
         COLUMN_NAME: sanitized_id
           DATA_TYPE: int
         COLUMN_TYPE: int(10)
           is_signed: 0
           max_value: 2147483647
      AUTO_INCREMENT: 3
auto_increment_ratio: 0.0000

Original issue reported on code.google.com by eric.har...@gmail.com on 7 Jan 2013 at 8:55

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r407.

Original comment by shlomi.n...@gmail.com on 8 Jan 2013 at 6:12

GoogleCodeExporter commented 8 years ago
Thank you! Keen eyed.
The bug is rather in the implementation. The documentation is correct and this 
should be clear from the name of the column that if "is_signed = 1" then the 
type is signed.

This is now fixed in revision 407 (not yet released). Expect a release this 
January.
For convenience, I have also added the "is_unsigned" column.

Original comment by shlomi.n...@gmail.com on 8 Jan 2013 at 6:12