Quantcast
Channel: SBFspot Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 360

Commented Unassigned: MySQL EToday and ETotal as integer [173]

$
0
0
I just find strange behaviour. I'm not an expert in DB engines but it looks wired.

Inverters table has the same definition for Sqlite and MySQL.
CREATE Table Inverters (
Serial int(4) NOT NULL,
Name varchar(32),
Type varchar(32),
SW_Version varchar(32),
TimeStamp datetime,
TotalPac int,
EToday int(8),
ETotal int(8),
OperatingTime double,
FeedInTime double,
Status varchar(10),
GridRelay varchar(10),
Temperature float,
PRIMARY KEY (Serial)
);

However for Sqlite in my DB I have for example this values for EToday and ETotal
1.885|50.353
0.177|3.732
0.172|6.233
What is quite strange as it should be int(8). Issue is that MySQL keep this as real integer like below
1|50
0|3
0|6

I had to change data type to float and now MySql store data properly.
In SpotData all is fine because there are Wh and can be kept as int but in Inverters we have kWh.

Anyway there is Segmentation fault in build for mysql v3.2 fro sure after data upload to DB.
Comments: From my point of view change from int to float for mysql is the easiest way. You don't need change anything else. Of course if You don't use these values in some export functions but I guess that You use SpotData table. One argument for this is it won't impact any current solutions based on reading current status from Inverters table. Like my :) If you will change to Wh I will have jump in charts from the time of new SBFspot compilation. From other hand second option will unified a way how values are stored. Reagrding segfault: Yes, I have /usr/local/bin/sbfspot.3/SBFspot -v -nocsv -finq At this moment ******************** * ArchiveDayData() * ******************** startTime = 58926870 -> 02/02/2017 00:00:00 Segmentation fault Witch csv /usr/local/bin/sbfspot.3/SBFspot -v -finq At this moment ******************** * ArchiveDayData() * ******************** startTime = 58926870 -> 02/02/2017 00:00:00 ExportDayDataToCSV() Segmentation fault

Viewing all articles
Browse latest Browse all 360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>