I am running CMS 1.7.2

I am receiving “SQLSTATE[22003]: Numeric value out of range: 1264” errors for the “storageTotalSpace” “storageAvailableSpace” cells in the Display table.

The “storageTotalSpace” “storageAvailableSpace” cells are all 0. If I change the cell type from INT to BIGINT the cells populate and the errors in the log stop.

I am not sure this is the proper way to solve this.

How much storage do you have available and free please? It may be that if you have terabytes of storage it’s overflowing the largest number that can be stored in an int. If so we would need to consider changing that field to a different data type, but you would be advised to allow the upgrade to do that otherwise when you come to run the upgrade it will likely fail as the schema we expect to be in place will have been modified already.

Hi Alex,

From the database:
Total space is showing 10965762048
Free space is showing 10922868736

I don’t think that can be correct. The units I am using only have 16GB of space total. If those numbers are in kb then that would be almost 11 Terrabytes.

On the Android device under settings/storage I see 10.08GB Total and 9.80GB free.

Looks about right. 10965762048 bytes is about 10GB.

@Dan do we need to adjust the data type here?

Any thoughts on whether we should have BIGINT datatypes or store the values in KB ? Or both I suppose…

Is this related?

Use of undefined constant storageAvailableSpace - assumed 'storageAvailableSpace’

I’m not sure why you would get that notice - that is this line:

$row['storageAvailableSpaceFormatted'] = Kit::formatBytes($row['storageAvailableSpace']);

I think I will change that column datatype to BIGINT as the fix.

I seem to get this error every time one of my android devices with 16GB is sent an update.

Are you still getting that error after upgrading to 1.7.3? 1.7.3 has the changed data type to BIGINT for that value. If you did change your database you’ll need to revert that change before upgrading to be sure there are no issues when the upgrade changes that data type.

Upgraded to 1.7.3 and the error seems to be gone.