Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-8809

sql_create_table broke for firebird, mssql when return_statements is false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.0.6
    • 3.0.x
    • None
    • PHP Environment:
      Database:

      It uses this code:

      						$primary_key_stmts = $this->sql_create_primary_key($table_name, $table_data['PRIMARY_KEY']);
      						foreach ($primary_key_stmts as $pk_stmt)
      						{
      							$statements[] = $pk_stmt;
      						}

      Problem is sql_create_primary_key returns this:
      return $this->_sql_run_sql($statements);

      When return_statements is false (defaults to false) it then runs the query (trying to create the primary key for a non-existent table and returns bool true) instead of returning it.

      Later on in the function it is done right where it handles the keys, it sets the return_statements to true.

            Acyd Burn Meik Sievertsen [X] (Inactive)
            EXreaction EXreaction [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: