5.7.21. Bugzilla::DB::Mysql

5.7.21.1. NAME

Bugzilla::DB::Mysql - Bugzilla database compatibility layer for MySQL

5.7.21.2. DESCRIPTION

This module overrides methods of the Bugzilla::DB module with MySQL specific implementation. It is instantiated by the Bugzilla::DB module and should never be used directly.

For interface details see Bugzilla::DB and DBI.

5.7.21.3. MYSQL-SPECIFIC DATABASE-READING METHODS

These methods read information about the database from the disk, instead of from a Schema object. They are only reliable for MySQL (see bug 285111 for the reasons why not all DBs use/have functions like this), but that’s OK because we only need them for backwards-compatibility anyway, for versions of Bugzilla before 2.20.

  • bz_column_info_real($table, $column)
Description: Returns an abstract column definition for a column
             as it actually exists on disk in the database.
Params:      $table - The name of the table the column is on.
             $column - The name of the column you want info about.
Returns:     An abstract column definition.
             If the column does not exist, returns undef.
  • bz_index_info_real($table, $index)
Description: Returns information about an index on a table in the database.
Params:      $table = name of table containing the index
             $index = name of an index
Returns:     An abstract index definition, always in hashref format.
             If the index does not exist, the function returns undef.
  • bz_index_list_real($table)
Description: Returns a list of index names on a table in
             the database, as it actually exists on disk.
Params:      $table - The name of the table you want info about.
Returns:     An array of index names.

5.7.21.4. MYSQL-SPECIFIC “SCHEMA BUILDER”

MySQL needs to be able to read in a legacy database (from before Schema existed) and create a Schema object out of it. That’s what this code does.

5.7.21.5. Methods in need of POD

  • sql_date_format
  • bz_explain
  • bz_last_key
  • sql_position
  • sql_fulltext_search
  • sql_iposition
  • bz_enum_initial_values
  • sql_group_by
  • sql_limit
  • sql_not_regexp
  • sql_string_concat
  • sql_date_math
  • sql_to_days
  • bz_check_server_version
  • sql_from_days
  • sql_regexp
  • sql_istring
  • sql_group_concat
  • bz_setup_database
  • bz_db_is_utf8

This documentation undoubtedly has bugs; if you find some, please file them here.