Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas

This commit is contained in:
Isaac Connor 2016-12-13 13:36:38 -05:00
commit ca65f8287f
3 changed files with 19 additions and 8 deletions

9
db/zm_update-1.30.10.sql Normal file
View File

@ -0,0 +1,9 @@
-- This updates a 1.30.9 database to 1.30.10
--
-- Alter type of Messages column from VARCHAR(255) to TEXT
--
-- ALTER TABLE Logs ALTER Message DROP DEFAULT;
ALTER TABLE Logs MODIFY Message TEXT NOT NULL;
ALTER TABLE Config MODIFY DefaultValue TEXT;

View File

@ -619,8 +619,10 @@ void Logger::logPrint( bool hex, const char * const filepath, const int line, co
snprintf( sql, sizeof(sql), "insert into Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) values ( %ld.%06ld, '%s', %d, %d, %d, '%s', '%s', '%s', %d )", timeVal.tv_sec, timeVal.tv_usec, mId.c_str(), staticConfig.SERVER_ID, tid, level, classString, escapedString, file, line );
if ( mysql_query( &mDbConnection, sql ) )
{
Level tempDatabaseLevel = mDatabaseLevel;
databaseLevel( NOLOG );
Error( "Can't insert log entry: %s", mysql_error( &mDbConnection ) );
Error( "Can't insert log entry: sql(%s) error(%s)", sql, mysql_error( &mDbConnection ) );
databaseLevel(tempDatabaseLevel);
}
}
if ( level <= mSyslogLevel )

View File

@ -1 +1 @@
1.30.9
1.30.10