Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
chore(release): merge hotfix-MON-14893-index-data (#11681)
Browse files Browse the repository at this point in the history
* fix(upgrade): Correctly Parse SQL Comments (#11658) (#11668)

Refs: MON-14848

Co-authored-by: jeremyjaouen <61694165+jeremyjaouen@users.noreply.github.com>

* fix invalid values for index_data.special (#11669)

* chore(install):update version to 22.04.4

Co-authored-by: Kevin Duret <kduret@centreon.com>
Co-authored-by: jeremyjaouen <61694165+jeremyjaouen@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 2, 2022
1 parent 4de8b7d commit fe86ab8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private function writeExecutedQueriesCountInTemporaryFile(string $tmpFile, int $
*/
private function isSqlComment(string $line): bool
{
return str_starts_with('--', trim($line));
return str_starts_with(trim($line), '--');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion www/install/insertBaseConf.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Insert version
--

INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '22.04.3');
INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '22.04.4');

--
-- Contenu de la table `contact`
Expand Down
19 changes: 19 additions & 0 deletions www/install/php/Update-22.04.4.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/*
* Copyright 2005 - 2022 Centreon (https://www.centreon.com/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information : contact@centreon.com
*/
1 change: 1 addition & 0 deletions www/install/sql/centstorage/Update-CSTG-22.04.4.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE `index_data` SET `special` = '0' WHERE `special` <> '1';

0 comments on commit fe86ab8

Please sign in to comment.