SITE_DISKUSAGE mediumint(10)

View: New views
2 Messages — Rating Filter:   Alert me  

SITE_DISKUSAGE mediumint(10)

by NightHawk-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I ran into an interesting problem that might affect other antville
installations aswell today. I am running Mysql 5.x which seems to be
more strict about datatypes and the values you try to store with them.
Apparently I have uploaded more than ~8MB of files (mostly pictures)
to my blog which resulted in the following error message:

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range
value adjusted for column 'SITE_DISKUSAGE' at row 1

I got that message while using the metaWeblogAPI, but I'm pretty sure
it would have happened aswell, if I had uploaded a file using the
Antville Webfrontend.
The simple fix to this is making the column SITE_DISKUSAGE in the
AV_SITE table a little bigger.. I made it "int(11) unsigned" which has
a maximum value of 4294967295 - that should be enough for a while.
I would suggest that every Antville administrator does the same, even
when running Mysql 4.x only since using mediumint(10) will only result
in inconsistent data for large blogs - which is exactly where this
column comes in handy.

+n
_______________________________________________
Antville-dev mailing list
Antville-dev@...
http://helma.org/mailman/listinfo/antville-dev

Re: SITE_DISKUSAGE mediumint(10)

by Franz Philipp Moser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



nighthawk wrote:
> Hi,

Hi,

> I ran into an interesting problem that might affect other antville
> installations aswell today. I am running Mysql 5.x which seems to be
> more strict about datatypes and the values you try to store with them.
> Apparently I have uploaded more than ~8MB of files (mostly pictures)
> to my blog which resulted in the following error message:
>
> com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range
> value adjusted for column 'SITE_DISKUSAGE' at row 1

Funny to hear that, I experienced the same problem this weekend on our
installation. I didn't know that this comes from our Mysql 5.x.

> I got that message while using the metaWeblogAPI, but I'm pretty sure
> it would have happened aswell, if I had uploaded a file using the
> Antville Webfrontend.
> The simple fix to this is making the column SITE_DISKUSAGE in the
> AV_SITE table a little bigger.. I made it "int(11) unsigned" which has
> a maximum value of 4294967295 - that should be enough for a while.
> I would suggest that every Antville administrator does the same, even
> when running Mysql 4.x only since using mediumint(10) will only result
> in inconsistent data for large blogs - which is exactly where this
> column comes in handy.

I did it, thank you.

> +n
<snip />

cu Philipp
--
XML is the ASCII for the new millenium
(Cocoon Documentation)
_______________________________________________
Antville-dev mailing list
Antville-dev@...
http://helma.org/mailman/listinfo/antville-dev