Commit 3943f047 authored by Claes Sjofors's avatar Claes Sjofors

Sev, sql query buffer for create table was to small

parent 9a2178af
...@@ -713,7 +713,7 @@ sev_db *sev_dbms::open_database() ...@@ -713,7 +713,7 @@ sev_db *sev_dbms::open_database()
int sev_dbms::create_table( pwr_tStatus *sts, char *tablename, pwr_eType type, int sev_dbms::create_table( pwr_tStatus *sts, char *tablename, pwr_eType type,
unsigned int size, pwr_tMask options, float deadband) unsigned int size, pwr_tMask options, float deadband)
{ {
char query[200]; char query[400];
char timeformatstr[80]; char timeformatstr[80];
char jumpstr[80]; char jumpstr[80];
char idtypestr[20]; char idtypestr[20];
...@@ -1007,7 +1007,7 @@ int sev_dbms::store_value( pwr_tStatus *sts, int item_idx, int attr_idx, ...@@ -1007,7 +1007,7 @@ int sev_dbms::store_value( pwr_tStatus *sts, int item_idx, int attr_idx,
if(m_items[item_idx].attrnum > 1) { if(m_items[item_idx].attrnum > 1) {
return store_objectvalue(sts, item_idx, attr_idx, time, buf, m_items[item_idx].old_value, size); return store_objectvalue(sts, item_idx, attr_idx, time, buf, m_items[item_idx].old_value, size);
} }
char query[200]; char query[400];
char bufstr[512]; char bufstr[512];
char timstr[40]; char timstr[40];
int update_time_only = 0; int update_time_only = 0;
...@@ -1419,7 +1419,7 @@ int sev_dbms::get_values( pwr_tStatus *sts, pwr_tOid oid, pwr_tMask options, flo ...@@ -1419,7 +1419,7 @@ int sev_dbms::get_values( pwr_tStatus *sts, pwr_tOid oid, pwr_tMask options, flo
} }
char query[200]; char query[400];
char starttimstr[40]; char starttimstr[40];
char endtimstr[40]; char endtimstr[40];
int total_rows; int total_rows;
......
...@@ -329,7 +329,7 @@ int sev_dbsqlite::createSevVersion3Tables(void) ...@@ -329,7 +329,7 @@ int sev_dbsqlite::createSevVersion3Tables(void)
int sev_dbsqlite::create_table( pwr_tStatus *sts, char *tablename, pwr_eType type, int sev_dbsqlite::create_table( pwr_tStatus *sts, char *tablename, pwr_eType type,
unsigned int size, pwr_tMask options, float deadband) unsigned int size, pwr_tMask options, float deadband)
{ {
char query[200]; char query[400];
char *errmsg; char *errmsg;
char timeformatstr[80]; char timeformatstr[80];
char jumpstr[80]; char jumpstr[80];
...@@ -659,7 +659,7 @@ int sev_dbsqlite::store_value( pwr_tStatus *sts, int item_idx, int attr_idx, ...@@ -659,7 +659,7 @@ int sev_dbsqlite::store_value( pwr_tStatus *sts, int item_idx, int attr_idx,
if(m_items[item_idx].attrnum > 1) { if(m_items[item_idx].attrnum > 1) {
return store_objectvalue(sts, item_idx, attr_idx, time, buf, m_items[item_idx].old_value, size); return store_objectvalue(sts, item_idx, attr_idx, time, buf, m_items[item_idx].old_value, size);
} }
char query[200]; char query[400];
char *errmsg; char *errmsg;
char bufstr[512]; char bufstr[512];
char timstr[40]; char timstr[40];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment