@@ -5226,8 +5226,6 @@ BootStrapXLOG(uint32 data_checksum_version)
52265226 /* save database compatible level value */
52275227 ControlFile -> dbmode = bootstrap_database_mode ;
52285228 ControlFile -> casemode = identifier_case_switch ;
5229-
5230-
52315229
52325230 /* some additional ControlFile fields are set in WriteControlFile() */
52335231 WriteControlFile ();
@@ -5425,7 +5423,7 @@ CleanupAfterArchiveRecovery(TimeLineID EndOfLogTLI, XLogRecPtr EndOfLog,
54255423 }
54265424}
54275425
5428- /* IvorySQL: BEGIN - case sensitive indentify
5426+ /* IvorySQL: BEGIN - case- sensitive indentifier support
54295427 * Read database compatibility mode from pg_control file
54305428 *
54315429 */
@@ -5442,7 +5440,7 @@ int GetDatabaseStyleFromControl(char* path)
54425440 else
54435441 configdir = make_absolute_path (getenv ("PGDATA" ));
54445442
5445- sprintf (pathname ,"%s/%s" ,configdir ,XLOG_CONTROL_FILE );
5443+ snprintf (pathname , sizeof ( pathname ), "%s/%s" , configdir , XLOG_CONTROL_FILE );
54465444
54475445 fd = open (pathname , O_RDONLY | PG_BINARY , 0 );
54485446
@@ -5484,7 +5482,7 @@ int GetCaseSwitchModeFromControl(char* path)
54845482 else
54855483 configdir = make_absolute_path (getenv ("PGDATA" ));
54865484
5487- sprintf (pathname ,"%s/%s" ,configdir ,XLOG_CONTROL_FILE );
5485+ snprintf (pathname , sizeof ( pathname ), "%s/%s" , configdir , XLOG_CONTROL_FILE );
54885486
54895487 fd = open (pathname , O_RDONLY | PG_BINARY , 0 );
54905488
@@ -5519,7 +5517,7 @@ void SetCaseGucOption(char* path)
55195517
55205518 dbstyle = GetDatabaseStyleFromControl (path );
55215519
5522- //the pg mode does not need to set
5520+ /* PG mode leaves identifier_case_switch unchanged. */
55235521 if (DB_ORACLE == dbstyle )
55245522 {
55255523 int casemode ;
@@ -5545,6 +5543,7 @@ void SetCaseGucOption(char* path)
55455543 (errmsg ("Incorrect case conversion mode value \"%d\"" , casemode )));
55465544 }
55475545}
5546+ /* IvorySQL: END - case-sensitive identifier support */
55485547
55495548/*
55505549 * Check to see if required parameters are set high enough on this server
0 commit comments