Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql error: Incorrect integer value: 'Source1' for column rSysLog.logcon_savedreports.sourceid at row 1 #58

Open
vsc55 opened this issue May 7, 2020 · 5 comments

Comments

@vsc55
Copy link
Contributor

vsc55 commented May 7, 2020

Adding savereport and the source is configured in the config.php file produces the following error since the 'sourceid' column is of type INT and adding a STRING is being tried.

Database error: Invalid SQL: INSERT INTO logcon_savedreports (reportid, sourceid, customTitle, customComment, filterString, customFilters, outputFormat, outputTarget, outputTargetDetails, scheduleSettings) VALUES ('auditsummary', 'Source1', 'EventLog Audit Summary Report', '', '', '_maxHosts=>20, _maxauditsummarysPerHost=>100, _colorThreshold=>10, _events_logon=>1, _events_logoff=>1, _events_logonfail=>1, _events_policychangeevents=>1, _events_objectaccess=>1, _events_systemevents=>1, _events_hostsessionevents=>1, _events_useraccchangeevents=>1, _events_auditpolicychangesevents=>1, _events_useractions=>1, _events_hostactions=>1', 'html', 'stdout', 'filename=>,', '' )
mysql error: Incorrect integer value: 'Source1' for column `rSysLog`.`logcon_savedreports`.`sourceid` at row 1
mysql error number: 1366
Date: 07.05.2020 @ 21:31
Script: /admin/reports.php?op=addsavedreport&id=auditsummary
Referer: http://www/admin/reports.php?op=addsavedreport&id=auditsummary
vsc55 added a commit to vsc55/loganalyzer that referenced this issue May 12, 2020
fix db_template, "db_update_v12" missing.
@vsc55
Copy link
Contributor Author

vsc55 commented May 12, 2020

Fix problem generate new savedreports, now the following error occurs when modifying an already created savereports.

Database error: Invalid SQL: UPDATE logcon_savedreports SET sourceid = Source1, customTitle = 'EventLog Audit Summary Report', customComment = '', filterString = '', customFilters = '_maxHosts=>20, _maxauditsummarysPerHost=>100, _colorThreshold=>10, _events_logon=>1, _events_logoff=>1, _events_logonfail=>1, _events_policychangeevents=>1, _events_objectaccess=>1, _events_systemevents=>1, _events_hostsessionevents=>1, _events_useraccchangeevents=>1, _events_auditpolicychangesevents=>1, _events_useractions=>1, _events_hostactions=>1', outputFormat = 'html', outputTarget = 'stdout', outputTargetDetails = 'filename=>,', scheduleSettings = '' WHERE ID = 2
mysql error: Unknown column 'Source1' in 'field list'
mysql error number: 1054
Date: 13.05.2020 @ 00:28
Script: /admin/reports.php?op=editsavedreport&id=auditsummary&savedreportid=2
Referer: http://www/admin/reports.php?op=editsavedreport&id=auditsummary&savedreportid=2

@vsc55
Copy link
Contributor Author

vsc55 commented May 12, 2020

Fix Update savedreports in pull #65 75776cf

vsc55 added a commit to vsc55/loganalyzer that referenced this issue May 12, 2020
alorbach added a commit that referenced this issue Jul 8, 2020
fix db_template, "db_update_v12" missing.
@badbod
Copy link

badbod commented Jan 8, 2021

I am still seeing this issue when 'Add savedreport and save changes' or 'Add savedreport and return to report list.

Adiscon LogAnalyzer Version 4.1.11
mysql source configured in config.php file
Current Installed Database Version: 12 LogAnalyzer Database Version: 12

Any way I can fix it? I tried updating files from this repo, and run upgrade.php
Did I miss something?
is there a manual fix I can apply?
Removing source from config file and add from web UI?

Any ideas welcome so I can get the reports working

Database error: Invalid SQL: INSERT INTO logcon_savedreports (reportid, sourceid, customTitle, customComment, filterString, customFilters, outputFormat, outputTarget, outputTargetDetails, scheduleSettings) VALUES ('eventsummary', 'Source1', 'EventLog Summary Report', '', '', '_maxHosts=>20, _maxEventsPerHost=>100, _colorThreshold=>10', 'html', 'stdout', 'filename=>,', '' ) mysql error: Incorrect integer value: 'Source1' for column 'sourceid' at row 1 mysql error number: 1366 Date: 08.01.2021 @ 15:19 Script: /admin/reports.php?op=addsavedreport&id=eventsummary Referer: http://syslog.aenxchange.com/admin/reports.php?op=addsavedreport&id=eventsummary

@alorbach
Copy link
Member

alorbach commented Jan 8, 2021

Perhaps database update did report an error?

Try running the SQL command manually:
ALTER TABLE logcon_savedreports CHANGE sourceid sourceid VARCHAR(11) NOT NULL;

@badbod
Copy link

badbod commented Jan 12, 2021

aahh, I did not see any error, I do see this in the db_update_v_12.txt , but it was still set to int(11), Going through the updates now making sure they have all been applied

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants