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

[ticket/12570] Fix updating a config with the same value #2492

Merged
merged 7 commits into from
May 26, 2014

Conversation

nickvergessen
Copy link
Contributor

@nickvergessen nickvergessen changed the title [ticket/12570] Add test for updating a config with the same value [ticket/12570] Fix updating a config with the same value May 23, 2014
bantu added a commit to bantu/phpbb that referenced this pull request May 23, 2014
[ticket/12570] Fix updating a config with the same value

* nickvergessen/ticket/12570:
  [ticket/12570] Remove test for affected rows after SELECT
  [ticket/12570] Add a test for set_array() and updating with the same value
  [ticket/12570] Fix MySQL affectedrows
  [ticket/12570] Fix MySQLi affectedrows by specifying MYSQLI_CLIENT_FOUND_ROWS
  [ticket/12570] Add a unit test to show broken sql_affectedrows()
  [ticket/12570] Add test for updating a config with the same value
@@ -57,7 +57,8 @@ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = fals
}
}

$this->db_connect_id = @mysqli_connect($this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket);
$this->db_connect_id = @mysqli_init();
$this->db_connect_id->real_connect($this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket, MYSQLI_CLIENT_FOUND_ROWS);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this procedular for consistency? mysqli_real_connect()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

We always want the number of matched rows instead of changed rows,
when running an update. So when mysql_info() returns the number of
matched rows we return that one instead of mysql_affected_rows()

PHPBB3-12570
It's not supposed to work

PHPBB3-12570
bantu added a commit to bantu/phpbb that referenced this pull request May 26, 2014
[ticket/12570] Fix updating a config with the same value

* nickvergessen/ticket/12570:
  [ticket/12570] Keep MySQLi procedural
  [ticket/12570] Remove test for affected rows after SELECT
  [ticket/12570] Add a test for set_array() and updating with the same value
  [ticket/12570] Fix MySQL affectedrows
  [ticket/12570] Fix MySQLi affectedrows by specifying MYSQLI_CLIENT_FOUND_ROWS
  [ticket/12570] Add a unit test to show broken sql_affectedrows()
  [ticket/12570] Add test for updating a config with the same value
@bantu bantu merged commit fcdf110 into phpbb:develop-ascraeus May 26, 2014
@nickvergessen nickvergessen deleted the ticket/12570 branch May 26, 2014 21:50
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

Successfully merging this pull request may close these issues.

2 participants