Arithmetic overflow error for data type tinyint

Posted By simonrl Wed 8 Oct 2014
Add to Favorites0
Author Message
simonrl
 Posted Wed 8 Oct 2014
Supreme Being

Supreme Being - (11,186 reputation)Supreme Being - (11,186 reputation)Supreme Being - (11,186 reputation)Supreme Being - (11,186 reputation)Supreme Being - (11,186 reputation)Supreme Being - (11,186 reputation)Supreme Being - (11,186 reputation)Supreme Being - (11,186 reputation)Supreme Being - (11,186 reputation)

Group: Forum Members
Last Active: Tue 23 Feb 2021
Posts: 18, Visits: 88
Here's an odd one...

Kartis site v2.7001, Server 2008 R2, SQL Server 2012 Web edition.

Site was running last night, overnight no changes at all; no orders, no changes using /admin.

This morning the site and CMS were returning HTTP 500 with this error:

Arithmetic overflow error for data type tinyint, value = 595

I assumed my client had changed something in the CMS and had unwittingly added a value of >255 into a tinyint database field (which shouldn't be possible of course), but no, the CMS hasn't been used for several days and the tblKartrisAdminLog confirms this.

So I restored yesterday's backup and the problem fixed itself.

However I wanted to work out why the problem occurred in the first place.

So I checked each and every table in the database looking for tinyint columns looking for anything untoward. Nothing.

So I checked the event logs for IIS and spotted this line in the corresponding record for this event:

kartrisProductsDataTableAdapters.ProductsTblAdptr.GetTopList(Nullable`1 Limit, Nullable`1 LANG_ID, Nullable`1 StartDate)

So assuming it was related to tblKartisProducts I checked that table - the only instance of '595' (being the apparently offending number) was in the P_ID column for a product configured as shown below:

595 True NULL V_OrderByValue NULL d y NULL m NULL NULL NULL NULL

I didn't want to delete this in case it caused issues with versions so I set P_Live manually to False, and refreshed the site.

And that fixed the problem.

So in summary, a product with 3 versions that has been in the database since the initial export from Cactus; on a site that was working last night caused the site to crash this morning. Setting the product's P_Live status - manually in the database - to False fixed the problem.

Confused?

I am.

Any pointers from team Kartris HQ? Is this likely a data issue or a bug in the GetTopList?

Thanks,
Simon
Wed 8 Oct 2014 by simonrl

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top