亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mysql.pm

?? bugzilla
?? PM
字號:
# -*- Mode: perl; indent-tabs-mode: nil -*-## The contents of this file are subject to the Mozilla Public# License Version 1.1 (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.mozilla.org/MPL/## Software distributed under the License is distributed on an "AS# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or# implied. See the License for the specific language governing# rights and limitations under the License.## The Original Code is the Bugzilla Bug Tracking System.## The Initial Developer of the Original Code is Netscape Communications# Corporation. Portions created by Netscape are# Copyright (C) 1998 Netscape Communications Corporation. All# Rights Reserved.## Contributor(s): Andrew Dunstan <andrew@dunslane.net>,#                 Edward J. Sabol <edwardjsabol@iname.com>#                 Max Kanat-Alexander <mkanat@bugzilla.org>package Bugzilla::DB::Schema::Mysql;################################################################################# DB::Schema implementation for MySQL################################################################################use strict;use Bugzilla::Error;use base qw(Bugzilla::DB::Schema);# This is for column_info_to_column, to know when a tinyint is a # boolean and when it's really a tinyint. This only has to be accurate# up to and through 2.19.3, because that's the only time we need# column_info_to_column.## This is basically a hash of tables/columns, with one entry for each column# that should be interpreted as a BOOLEAN instead of as an INT1 when# reading in the Schema from the disk. The values are discarded; I just# used "1" for simplicity.use constant BOOLEAN_MAP => {    bugs           => {everconfirmed => 1, reporter_accessible => 1,                       cclist_accessible => 1, qacontact_accessible => 1,                       assignee_accessible => 1},    longdescs      => {isprivate => 1, already_wrapped => 1},    attachments    => {ispatch => 1, isobsolete => 1, isprivate => 1},    flags          => {is_active => 1},    flagtypes      => {is_active => 1, is_requestable => 1,                        is_requesteeble => 1, is_multiplicable => 1},    fielddefs      => {mailhead => 1, obsolete => 1},    bug_status     => {isactive => 1},    resolution     => {isactive => 1},    bug_severity   => {isactive => 1},    priority       => {isactive => 1},    rep_platform   => {isactive => 1},    op_sys         => {isactive => 1},    profiles       => {mybugslink => 1, newemailtech => 1},    namedqueries   => {linkinfooter => 1, watchfordiffs => 1},    groups         => {isbuggroup => 1, isactive => 1},    group_control_map => {entry => 1, membercontrol => 1, othercontrol => 1,                          canedit => 1},    group_group_map => {isbless => 1},    user_group_map => {isbless => 1, isderived => 1},    products       => {disallownew => 1},    series         => {public => 1},    whine_queries  => {onemailperbug => 1},    quips          => {approved => 1},    setting        => {is_enabled => 1}};# Maps the db_specific hash backwards, for use in column_info_to_column.use constant REVERSE_MAPPING => {    # Boolean and the SERIAL fields are handled in column_info_to_column,    # and so don't have an entry here.    TINYINT   => 'INT1',    SMALLINT  => 'INT2',    MEDIUMINT => 'INT3',    INTEGER   => 'INT4',    # All the other types have the same name in their abstract version    # as in their db-specific version, so no reverse mapping is needed.};#------------------------------------------------------------------------------sub _initialize {    my $self = shift;    $self = $self->SUPER::_initialize(@_);    $self->{db_specific} = {        BOOLEAN =>      'tinyint',        FALSE =>        '0',         TRUE =>         '1',        INT1 =>         'tinyint',        INT2 =>         'smallint',        INT3 =>         'mediumint',        INT4 =>         'integer',        SMALLSERIAL =>  'smallint auto_increment',        MEDIUMSERIAL => 'mediumint auto_increment',        INTSERIAL =>    'integer auto_increment',        TINYTEXT =>     'tinytext',        MEDIUMTEXT =>   'mediumtext',        TEXT =>         'text',        LONGBLOB =>     'longblob',        DATETIME =>     'datetime',    };    $self->_adjust_schema;    return $self;} #eosub--_initialize#------------------------------------------------------------------------------sub _get_create_table_ddl {    # Extend superclass method to specify the MYISAM storage engine.    # Returns a "create table" SQL statement.    my($self, $table) = @_;    my $charset = Bugzilla->dbh->bz_db_is_utf8 ? "CHARACTER SET utf8" : '';    return($self->SUPER::_get_create_table_ddl($table)            . " ENGINE = MYISAM $charset");} #eosub--_get_create_table_ddl#------------------------------------------------------------------------------sub _get_create_index_ddl {    # Extend superclass method to create FULLTEXT indexes on text fields.    # Returns a "create index" SQL statement.    my($self, $table_name, $index_name, $index_fields, $index_type) = @_;    my $sql = "CREATE ";    $sql .= "$index_type " if ($index_type eq 'UNIQUE'                               || $index_type eq 'FULLTEXT');    $sql .= "INDEX \`$index_name\` ON $table_name \(" .      join(", ", @$index_fields) . "\)";    return($sql);} #eosub--_get_create_index_ddl#--------------------------------------------------------------------sub get_create_database_sql {    my ($self, $name) = @_;    # We only create as utf8 if we have no params (meaning we're doing    # a new installation) or if the utf8 param is on.    my $create_utf8 = Bugzilla->params->{'utf8'}                       || !defined Bugzilla->params->{'utf8'};    my $charset = $create_utf8 ? "CHARACTER SET utf8" : '';    return ("CREATE DATABASE $name $charset");}# MySQL has a simpler ALTER TABLE syntax than ANSI.sub get_alter_column_ddl {    my ($self, $table, $column, $new_def, $set_nulls_to) = @_;    my $old_def = $self->get_column($table, $column);    my %new_def_copy = %$new_def;    if ($old_def->{PRIMARYKEY} && $new_def->{PRIMARYKEY}) {        # If a column stays a primary key do NOT specify PRIMARY KEY in the        # ALTER TABLE statement. This avoids a MySQL error that two primary        # keys are not allowed.        delete $new_def_copy{PRIMARYKEY};    }    my $new_ddl = $self->get_type_ddl(\%new_def_copy);    my @statements;    push(@statements, "UPDATE $table SET $column = $set_nulls_to                        WHERE $column IS NULL") if defined $set_nulls_to;    push(@statements, "ALTER TABLE $table CHANGE COLUMN                        $column $column $new_ddl");    if ($old_def->{PRIMARYKEY} && !$new_def->{PRIMARYKEY}) {        # Dropping a PRIMARY KEY needs an explicit DROP PRIMARY KEY        push(@statements, "ALTER TABLE $table DROP PRIMARY KEY");    }    return @statements;}sub get_drop_index_ddl {    my ($self, $table, $name) = @_;    return ("DROP INDEX \`$name\` ON $table");}# A special function for MySQL, for renaming a lot of indexes.# Index renames is a hash, where the key is a string - the # old names of the index, and the value is a hash - the index# definition that we're renaming to, with an extra key of "NAME"# that contains the new index name.# The indexes in %indexes must be in hashref format.sub get_rename_indexes_ddl {    my ($self, $table, %indexes) = @_;    my @keys = keys %indexes or return ();    my $sql = "ALTER TABLE $table ";    foreach my $old_name (@keys) {        my $name = $indexes{$old_name}->{NAME};        my $type = $indexes{$old_name}->{TYPE};        $type ||= 'INDEX';        my $fields = join(',', @{$indexes{$old_name}->{FIELDS}});        # $old_name needs to be escaped, sometimes, because it was        # a reserved word.        $old_name = '`' . $old_name . '`';        $sql .= " ADD $type $name ($fields), DROP INDEX $old_name,";    }    # Remove the last comma.    chop($sql);    return ($sql);}# Converts a DBI column_info output to an abstract column definition.# Expects to only be called by Bugzila::DB::Mysql::_bz_build_schema_from_disk,# although there's a chance that it will also work properly if called# elsewhere.sub column_info_to_column {    my ($self, $column_info) = @_;    # Unfortunately, we have to break Schema's normal "no database"    # barrier a few times in this function.    my $dbh = Bugzilla->dbh;    my $table = $column_info->{TABLE_NAME};    my $col_name = $column_info->{COLUMN_NAME};    my $column = {};    ($column->{NOTNULL} = 1) if $column_info->{NULLABLE} == 0;    if ($column_info->{mysql_is_pri_key}) {        # In MySQL, if a table has no PK, but it has a UNIQUE index,        # that index will show up as the PK. So we have to eliminate        # that possibility.        # Unfortunately, the only way to definitely solve this is        # to break Schema's standard of not touching the live database        # and check if the index called PRIMARY is on that field.        my $pri_index = $dbh->bz_index_info_real($table, 'PRIMARY');        if ( $pri_index && grep($_ eq $col_name, @{$pri_index->{FIELDS}}) ) {            $column->{PRIMARYKEY} = 1;        }    }    # MySQL frequently defines a default for a field even when we    # didn't explicitly set one. So we have to have some special    # hacks to determine whether or not we should actually put    # a default in the abstract schema for this field.    if (defined $column_info->{COLUMN_DEF}) {        # The defaults that MySQL inputs automatically are usually        # something that would be considered "false" by perl, either        # a 0 or an empty string. (Except for datetime and decimal        # fields, which have their own special auto-defaults.)        #        # Here's how we handle this: If it exists in the schema        # without a default, then we don't use the default. If it        # doesn't exist in the schema, then we're either going to        # be dropping it soon, or it's a custom end-user column, in which        # case having a bogus default won't harm anything.        my $schema_column = $self->get_column($table, $col_name);        unless ( (!$column_info->{COLUMN_DEF}                   || $column_info->{COLUMN_DEF} eq '0000-00-00 00:00:00'                  || $column_info->{COLUMN_DEF} eq '0.00')                && $schema_column                 && !exists $schema_column->{DEFAULT}) {                        my $default = $column_info->{COLUMN_DEF};            # Schema uses '0' for the defaults for decimal fields.             $default = 0 if $default =~ /^0\.0+$/;            # If we're not a number, we're a string and need to be            # quoted.            $default = $dbh->quote($default) if !($default =~ /^(-)?(\d+)(.\d+)?$/);            $column->{DEFAULT} = $default;        }    }    my $type = $column_info->{TYPE_NAME};    # Certain types of columns need the size/precision appended.    if ($type =~ /CHAR$/ || $type eq 'DECIMAL') {        # This is nicely lowercase and has the size/precision appended.        $type = $column_info->{mysql_type_name};    }    # If we're a tinyint, we could be either a BOOLEAN or an INT1.    # Only the BOOLEAN_MAP knows the difference.    elsif ($type eq 'TINYINT' && exists BOOLEAN_MAP->{$table}           && exists BOOLEAN_MAP->{$table}->{$col_name}) {        $type = 'BOOLEAN';        if (exists $column->{DEFAULT}) {            $column->{DEFAULT} = $column->{DEFAULT} ? 'TRUE' : 'FALSE';        }    }    # We also need to check if we're an auto_increment field.    elsif ($type =~ /INT/) {        # Unfortunately, the only way to do this in DBI is to query the        # database, so we have to break the rule here that Schema normally        # doesn't touch the live DB.        my $ref_sth = $dbh->prepare(            "SELECT $col_name FROM $table LIMIT 1");        $ref_sth->execute;        if ($ref_sth->{mysql_is_auto_increment}->[0]) {            if ($type eq 'MEDIUMINT') {                $type = 'MEDIUMSERIAL';            }            elsif ($type eq 'SMALLINT') {                $type = 'SMALLSERIAL';            }             else {                $type = 'INTSERIAL';            }        }        $ref_sth->finish;    }    # For all other db-specific types, check if they exist in     # REVERSE_MAPPING and use the type found there.    if (exists REVERSE_MAPPING->{$type}) {        $type = REVERSE_MAPPING->{$type};    }    $column->{TYPE} = $type;    #print "$table.$col_name: " . Data::Dumper->Dump([$column]) . "\n";    return $column;}sub get_rename_column_ddl {    my ($self, $table, $old_name, $new_name) = @_;    my $def = $self->get_type_ddl($self->get_column($table, $old_name));    # MySQL doesn't like having the PRIMARY KEY statement in a rename.    $def =~ s/PRIMARY KEY//i;    return ("ALTER TABLE $table CHANGE COLUMN $old_name $new_name $def");}1;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区影院| 成人爽a毛片一区二区免费| 国产日韩欧美a| 欧美影片第一页| 成人免费看黄yyy456| 日本伊人精品一区二区三区观看方式| 国产色婷婷亚洲99精品小说| 欧美丰满嫩嫩电影| 91成人在线精品| 风间由美中文字幕在线看视频国产欧美| 亚洲综合久久久| 国产精品国产三级国产aⅴ中文 | 久久久亚洲午夜电影| 欧美伦理影视网| 91丨九色丨蝌蚪丨老版| 高清beeg欧美| 国产一区二区按摩在线观看| 日本aⅴ免费视频一区二区三区| 国产suv精品一区二区6| 日本成人超碰在线观看| 亚洲一区二区三区四区在线免费观看| 国产精品美女久久久久久2018| 精一区二区三区| 日韩免费高清电影| 国产欧美精品一区aⅴ影院| 欧美精品aⅴ在线视频| 色老综合老女人久久久| 91网站最新网址| 岛国av在线一区| 国产成人亚洲精品狼色在线| 久久精品国产久精国产爱| 日韩精品成人一区二区三区| 亚洲综合色在线| 亚洲一区二区中文在线| 亚洲麻豆国产自偷在线| 国产精品国产三级国产专播品爱网 | 亚洲丝袜精品丝袜在线| 国产精品久久久久影院亚瑟| 中文字幕+乱码+中文字幕一区| 欧美精品一区二区三区四区 | 一区二区三区精品视频在线| 亚洲激情中文1区| 亚洲精品乱码久久久久久久久| 国产麻豆午夜三级精品| 国产精品亚洲午夜一区二区三区| 国产一区二区三区精品视频| 国产精品亚洲人在线观看| 成人激情小说乱人伦| 91污片在线观看| 欧美日韩在线三级| 欧美一级一区二区| 久久精品日产第一区二区三区高清版 | 亚洲国产精品二十页| 国产欧美综合在线观看第十页| 国产日产欧美精品一区二区三区| 亚洲国产精品成人综合色在线婷婷 | 亚洲欧美日韩人成在线播放| 一区二区在线观看视频| 亚洲成人激情自拍| 久久成人精品无人区| 国产精品 欧美精品| va亚洲va日韩不卡在线观看| 色婷婷激情综合| 宅男噜噜噜66一区二区66| 日韩一级二级三级精品视频| 久久综合五月天婷婷伊人| 日本一区二区不卡视频| 亚洲网友自拍偷拍| 欧美自拍丝袜亚洲| 欧美精品三级在线观看| 国产永久精品大片wwwapp | 韩国精品免费视频| 久久精品国产77777蜜臀| 成人在线一区二区三区| 日本久久电影网| 欧美一级高清大全免费观看| 国产女同互慰高潮91漫画| 亚洲摸摸操操av| 激情综合五月婷婷| 91蜜桃在线免费视频| 日韩欧美一级二级| 国产精品初高中害羞小美女文| 首页亚洲欧美制服丝腿| 国产精品影音先锋| 欧美日韩视频在线观看一区二区三区 | 欧洲国内综合视频| 久久久久国产精品厨房| 亚洲一区欧美一区| 国产一区二区不卡老阿姨| 91精品91久久久中77777| 久久亚区不卡日本| 亚洲二区在线视频| 成人免费毛片片v| 麻豆91在线播放免费| 懂色av一区二区夜夜嗨| 欧美精品一二三| 中文字幕一区二区三区不卡在线 | 日韩视频在线一区二区| 1区2区3区欧美| 国内精品不卡在线| 欧美少妇bbb| 国产精品国产三级国产普通话三级 | 欧美激情一区在线观看| 日本在线不卡一区| 在线亚洲一区二区| 国产精品视频一二三| 国内不卡的二区三区中文字幕 | 亚洲成人自拍一区| av在线一区二区| 久久久精品国产免大香伊 | 欧美变态口味重另类| 亚洲综合久久av| 91片在线免费观看| 国产视频视频一区| 黑人精品欧美一区二区蜜桃| 欧美日韩成人激情| 一区二区三区久久久| 99麻豆久久久国产精品免费优播| 欧美精品一区二区三区很污很色的| 亚洲成人午夜电影| 91久久免费观看| 亚洲欧美日本在线| 色伊人久久综合中文字幕| 国产精品毛片无遮挡高清| 国产福利一区在线| 久久精品日韩一区二区三区| 精品一区二区三区不卡| 亚洲一区二区三区视频在线| 99精品国产视频| 国产精品麻豆网站| 99精品黄色片免费大全| 亚洲色图视频网| 91美女精品福利| 亚洲另类在线制服丝袜| 一本大道久久a久久综合| 亚洲精品成人少妇| 在线观看网站黄不卡| 一区二区激情小说| 一本到不卡精品视频在线观看| 亚洲欧美日韩精品久久久久| 狠狠色丁香婷婷综合| 欧美视频一区二区三区四区| 亚洲精品国产一区二区三区四区在线| www.亚洲在线| 中文字幕一区二区三区在线播放| 成人av电影免费观看| 亚洲日本成人在线观看| 色哟哟精品一区| 亚洲午夜成aⅴ人片| 欧美一区二区性放荡片| 麻豆精品视频在线| 久久精品视频在线看| aaa国产一区| 亚洲第一在线综合网站| 欧美一区二区在线不卡| 国产酒店精品激情| 中文字幕在线免费不卡| 欧美亚洲国产一区二区三区| 丝袜国产日韩另类美女| 精品国产99国产精品| 丁香激情综合国产| 亚洲一区二区三区四区五区中文| 欧美精品一卡两卡| 国模一区二区三区白浆| 亚洲人快播电影网| 欧美日韩在线观看一区二区 | 国产最新精品精品你懂的| 精品一区二区三区不卡| 国产精品久久久久一区二区三区 | 午夜精品一区二区三区电影天堂 | 欧美变态tickling挠脚心| 成人性生交大合| 亚洲成人动漫精品| 久久精品在这里| 欧美性猛交xxxx黑人交| 狠狠色丁香久久婷婷综合_中| ...xxx性欧美| 精品欧美一区二区三区精品久久| thepron国产精品| 美女视频黄免费的久久| 国产精品不卡在线| 日韩欧美成人午夜| 在线视频你懂得一区| 国产一区二区免费看| 一区二区不卡在线视频 午夜欧美不卡在| 日韩女优视频免费观看| 日本伦理一区二区| 国产成人自拍网| 日韩电影在线一区| 亚洲欧美日韩国产另类专区| 精品日产卡一卡二卡麻豆| 欧美在线色视频| 成人小视频在线| 老司机免费视频一区二区三区| 最新日韩av在线| 日韩精品中午字幕| 欧美日韩美女一区二区| 99re这里都是精品| 国产精品一色哟哟哟| 日本美女一区二区|