-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
(FreeBSD) SQL Error on new monitor add #1355
Comments
A lot of similar errors, actually. SQL-ERR 'SQLSTATE[HY000]: General error: 1366 Incorrect decimal value: '' for column 'AnalysisFPS' at row 1', statement was 'insert into Monitors set LinkedMonitors = '', Name = 'Monitor-1', ServerId = '1', Type = 'Remote', Function = 'Monitor', Enabled = '1', RefBlendPerc = '6', AlarmRefBlendPerc = '6', AnalysisFPS = '', MaxFPS = '', AlarmMaxFPS = '', Options = '', LabelFormat = '%N - %d/%m/%y %H:%M:%S', LabelX = '0', LabelY = '0', LabelSize = '1', ImageBufferCount = '50', WarmupCount = '25', PreEventCount = '25', PostEventCount = '25', StreamReplayBuffer = '1000', AlarmFrameCount = '1', EventPrefix = 'Event-', SectionLength = '600', FrameSkip = '0', MotionFrameSkip = '0', AnalysisUpdateDelay = '0', FPSReportInterval = '1000', DefaultView = 'Events', DefaultRate = '100', DefaultScale = '100', WebColour = 'red', Exif = '0', Protocol = 'http', Method = 'simple', Host = 'admin:admin@192.168.1.101', Port = '80', Path = '/channel1', Colours = '3', Width = '2048', Height = '1536', Orientation = '0', Deinterlacing = '0', Sequence = 1' |
PHP notices in SQL query! SQL-ERR 'SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'User' at row 1', statement was 'insert into Monitors set LinkedMonitors = '', Protocol = 'http', Host = 'admin:admin@192.168.1.101', Port = '80', Method = 'simple', Options = '', Path = '/channel1', User = ' |
mysql> SELECT @@GLOBAL.sql_mode; http://dev.mysql.com/doc/refman/5.6/en/sql-mode.html#sql-mode-strict |
Looks like FreeBSD installs my.cnf with STRICT_TRANS_TABLES set. I don't know if it's default MySQL setting, but I strongly approve what it's doing. Fixing the project, however, can be very boring. |
This sounds like a duplicate of #319 |
Yep, didn't find. |
I think MySQL settings on FreeBSD are more strict and it doesn't allow incorrect integer values when no servers are used (default ZM settings). In this case, empty values should be converted to 0 or default server added to Servers table
SQL-ERR 'SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'ServerId' at row 1', statement was 'insert into Monitors set LinkedMonitors = '', Name = 'Monitor-1', ServerId = '', Type = 'Remote', Function = 'Monitor', Enabled = '1', RefBlendPerc = '6', AlarmRefBlendPerc = '6', AnalysisFPS = '', MaxFPS = '', AlarmMaxFPS = '', Options = '', LabelFormat = '%N - %d/%m/%y %H:%M:%S', LabelX = '0', LabelY = '0', LabelSize = '1', ImageBufferCount = '50', WarmupCount = '25', PreEventCount = '25', PostEventCount = '25', StreamReplayBuffer = '1000', AlarmFrameCount = '1', EventPrefix = 'Event-', SectionLength = '600', FrameSkip = '0', MotionFrameSkip = '0', AnalysisUpdateDelay = '0', FPSReportInterval = '1000', DefaultView = 'Events', DefaultRate = '100', DefaultScale = '100', WebColour = 'red', Exif = '0', Protocol = 'http', Method = 'simple', Host = 'admin:admin@192.168.1.101', Port = '80', Path = '', Colours = '3', Width = '320', Height = '240', Orientation = '0', Deinterlacing = '0', Sequence = 1'
The text was updated successfully, but these errors were encountered: