Test: различия между версиями
Материал из noname.com.ua
Перейти к навигацииПерейти к поискуSirmax (обсуждение | вклад) |
Sirmax (обсуждение | вклад) (→Query) |
||
(не показано 36 промежуточных версий 2 участников) | |||
Строка 1: | Строка 1: | ||
+ | [[Категория:Test]] |
||
+ | =Query= |
||
+ | <PRE> |
||
+ | select |
||
+ | if (dv.logins=0, if(tp.logins is null, 0, tp.logins), dv.logins) AS logins, |
||
+ | if(dv.filter_id != '', dv.filter_id, if(tp.filter_id is null, '', tp.filter_id)), |
||
+ | if(dv.ip>0, INET_NTOA(dv.ip), 0), INET_NTOA(dv.netmask), |
||
+ | dv.tp_id, |
||
+ | dv.speed, |
||
+ | dv.cid, |
||
+ | tp.total_time_limit, |
||
+ | tp.day_time_limit, |
||
+ | tp.week_time_limit, |
||
+ | tp.month_time_limit, |
||
+ | UNIX_TIMESTAMP(DATE_FORMAT(DATE_ADD(curdate(), INTERVAL 1 MONTH), '%Y-%m-01')) - UNIX_TIMESTAMP(), |
||
+ | tp.total_traf_limit, |
||
+ | tp.day_traf_limit, |
||
+ | tp.week_traf_limit, |
||
+ | tp.month_traf_limit, |
||
+ | tp.octets_direction, |
||
+ | if (count(un.uid) + count(tp_nas.tp_id) = 0, 0, if (count(un.uid)>0, 1, 2)),UNIX_TIMESTAMP(), UNIX_TIMESTAMP(DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP()), '%Y-%m-%d')), DAYOFWEEK(FROM_UNIXTIME(UNIX_TIMESTAMP())), DAYOFYEAR(FROM_UNIXTIME(UNIX_TIMESTAMP())), |
||
+ | dv.disable, |
||
+ | tp.max_session_duration, |
||
+ | tp.payment_type, |
||
+ | tp.credit_tresshold, |
||
+ | tp.rad_pairs, |
||
+ | count(i.id), |
||
+ | tp.age, |
||
+ | dv.callback, |
||
+ | dv.port, |
||
+ | tp.traffic_transfer_period, |
||
+ | tp.neg_deposit_filter_id, |
||
+ | tp.ext_bill_account, |
||
+ | tp.credit, |
||
+ | tp.ippool,dv.join_service, |
||
+ | tp.tp_id |
||
+ | FROM |
||
+ | (dv_main dv) |
||
+ | LEFT JOIN |
||
+ | tarif_plans tp |
||
+ | ON |
||
+ | (dv.tp_id=tp.id AND tp.domain_id='0') |
||
+ | LEFT JOIN |
||
+ | users_nas un |
||
+ | ON |
||
+ | (un.uid = dv.uid) |
||
+ | LEFT JOIN |
||
+ | tp_nas |
||
+ | ON |
||
+ | (tp_nas.tp_id = tp.tp_id) |
||
+ | LEFT JOIN |
||
+ | intervals i |
||
+ | ON |
||
+ | (tp.tp_id = i.tp_id) WHERE dv.uid='1720'GROUP BY dv.uid; |
||
+ | </PRE> |
||
− | == Components == |
||
+ | =res 1 (work)= |
||
− | {|border="1" cellpadding="20" cellspacing="0" |
||
+ | <PRE> |
||
− | |colspan="4"| |
||
+ | +--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ |
||
− | ===Gold 5 Components=== |
||
+ | | 1 | | 172.16.129.72 | 255.255.255.255 | 260 | 0 | | 0 | 0 | 0 | 0 | 114523 | 0 | 0 | 0 | 0 | 0 | 0 | 1298815877 | 1298757600 | 1 | 58 | 0 | 0 | 0 | 0.00 | | 1 | 0 | 0 | 0 | 0 | | 1 | 0.00 | 0 | 0 | 33 | |
||
− | |- |
||
+ | +--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ |
||
− | |colspan=2|Solaris||colspan=2|HP-UX |
||
+ | 1 row in set (0.01 sec) |
||
− | |- |
||
− | |Product Name||Full name (with version) |
||
− | |- |
||
− | |colspan=4|C++ Products |
||
− | |- |
||
− | |3333||4444|| || |
||
− | |- |
||
− | |5555||6666|| || |
||
− | |} |
||
+ | </PRE> |
||
− | |||
+ | =res 2 (not work)= |
||
− | |||
+ | <PRE> |
||
− | {| border="3" cellpadding="20" cellspacing="0" |
||
+ | +--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ |
||
− | |colspan="2"| |
||
+ | | logins | if(dv.filter_id != '', dv.filter_id, if(tp.filter_id is null, '', tp.filter_id)) | if(dv.ip>0, INET_NTOA(dv.ip), 0) | INET_NTOA(dv.netmask) | tp_id | speed | cid | total_time_limit | day_time_limit | week_time_limit | month_time_limit | UNIX_TIMESTAMP(DATE_FORMAT(DATE_ADD(curdate(), INTERVAL 1 MONTH), '%Y-%m-01')) - UNIX_TIMESTAMP() | total_traf_limit | day_traf_limit | week_traf_limit | month_traf_limit | octets_direction | if (count(un.uid) + count(tp_nas.tp_id) = 0, 0, if (count(un.uid)>0, 1, 2)) | UNIX_TIMESTAMP() | UNIX_TIMESTAMP(DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP()), '%Y-%m-%d')) | DAYOFWEEK(FROM_UNIXTIME(UNIX_TIMESTAMP())) | DAYOFYEAR(FROM_UNIXTIME(UNIX_TIMESTAMP())) | disable | max_session_duration | payment_type | credit_tresshold | rad_pairs | count(i.id) | age | callback | port | traffic_transfer_period | neg_deposit_filter_id | ext_bill_account | credit | ippool | join_service | tp_id | |
||
− | ===Вкуснейшие=== |
||
+ | +--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ |
||
− | |- |
||
+ | | 1 | | 172.16.129.72 | 255.255.255.255 | 260 | 0 | | 0 | 0 | 0 | 0 | 115649 | 0 | 0 | 0 | 0 | 0 | 0 | 1298814751 | 1298757600 | 1 | 58 | 0 | 0 | 0 | 0.00 | | 1 | 0 | 0 | 0 | 0 | | 1 | 0.00 | 0 | 0 | 33 | |
||
− | |Апельсин |
||
+ | +--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ |
||
− | |Яблоко |
||
+ | 1 row in set (0.00 sec) |
||
− | |- |
||
+ | </PRE> |
||
− | |Хлеб |
||
− | |Булка |
||
− | |- |
||
− | |Масло |
||
− | |Мороженое |
||
− | |} |
||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Products C/C++ Server/DB Version |
||
− | BC BC_DB__2.1.1.7 |
||
− | BP BP_9.1.0.3 |
||
− | COMMON COMMON__9.0.3.4 |
||
− | Dispatcher Dispatcher__9.1.0.1 |
||
− | DVX1 DVX1__9.0.3.2 |
||
− | DVX2 DVX2__3.0.0.1__N2_REL3.6.0.0 |
||
− | EZSFAM EZSFAM__3.4.1.0 |
||
− | EZSPMM2 EZSPMM2__4.0.1.0 |
||
− | FAM FAM__10.3.0.2 |
||
− | FAM Automator FaM_Automator__1.0.1.0 |
||
− | FAM_RE FAM_RE__1.2.2.0__N2_REL3.5.2.0 |
||
− | FAM_SERVICES FAM_SERVICES__10.3.0.4__N2_3.6.0.0 |
||
− | FAM_SERVICES_REMEDY FAM_SERVICES_REMEDY__9.1.3.1__N2_3.4.4.16 |
||
− | FamTroubleTicketAdapter (HP only) OCEANEADAPTERFT__1.4.0.5 |
||
− | GD GD__5.0.0.0 |
||
− | GD_PLUG_INS GD_PLUG_INS__5.0.0.0 |
||
− | GOLD_INFRA GOLD_SERVER__5.0.3.6 |
||
− | GOLD_INSTALLER GOLD_SERVER__5.0.3.18 |
||
− | INSTALL_ALL INSTALL_ALL__1.1.0.6 |
||
− | INT_ALARMS INT_ALARMS__2.4.0.0__N2_REL3.6.0.0 |
||
− | ISM_THIRD_PARTIES ISM_THIRD_PARTIES__1.4.4.3 |
||
− | MED2 MED2__3.0.0.0__N2_REL3.6.0.0 |
||
− | MS MS__3.2.0.0__N2_REL3.6.0.0 |
||
− | N2_3RD_PARTY_components N2_3RD_PARTY_components__1.0.0.25 |
||
− | N2P N2P__1.6.0.1_N2_3.6.0.0 |
||
− | NCI2 NCI2__6.0.0.0 |
||
− | NetKt NetKt 10.5 |
||
− | Netrac Monitor NetracMonitor__2.1 |
||
− | NETRAC2 NETRAC2__3.6.0.0 |
||
− | Netrac2_344x NETRAC2__3.4.4.18 |
||
− | PARTITION PARTITION__8.0.2.1 |
||
− | PMM1 PMM__9.2.3.5 |
||
− | PMM2 PMM__9.6.0.3__N2_3.6.0.0 |
||
− | pmmc - Actuate WR |
||
− | pmmc - BOXI WR |
||
− | SEC_INF SEC_INF__2.2.3.0 |
||
− | RECORD2TRAP RECORD2TRAP__2.0.1.0 |
||
− | SNMP_AGENT SNMP_AGENT__3.0.2.0 |
||
− | TRAFFIC_GUARD + WEB-TV TRAFFIC_GUARD__2.1.0.3__N2_3.6.0.0 |
||
− | |||
− | == Discontinued applications and features == |
||
− | |||
− | == Well known issues == |
Текущая версия на 16:11, 27 февраля 2011
Query
select if (dv.logins=0, if(tp.logins is null, 0, tp.logins), dv.logins) AS logins, if(dv.filter_id != '', dv.filter_id, if(tp.filter_id is null, '', tp.filter_id)), if(dv.ip>0, INET_NTOA(dv.ip), 0), INET_NTOA(dv.netmask), dv.tp_id, dv.speed, dv.cid, tp.total_time_limit, tp.day_time_limit, tp.week_time_limit, tp.month_time_limit, UNIX_TIMESTAMP(DATE_FORMAT(DATE_ADD(curdate(), INTERVAL 1 MONTH), '%Y-%m-01')) - UNIX_TIMESTAMP(), tp.total_traf_limit, tp.day_traf_limit, tp.week_traf_limit, tp.month_traf_limit, tp.octets_direction, if (count(un.uid) + count(tp_nas.tp_id) = 0, 0, if (count(un.uid)>0, 1, 2)),UNIX_TIMESTAMP(), UNIX_TIMESTAMP(DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP()), '%Y-%m-%d')), DAYOFWEEK(FROM_UNIXTIME(UNIX_TIMESTAMP())), DAYOFYEAR(FROM_UNIXTIME(UNIX_TIMESTAMP())), dv.disable, tp.max_session_duration, tp.payment_type, tp.credit_tresshold, tp.rad_pairs, count(i.id), tp.age, dv.callback, dv.port, tp.traffic_transfer_period, tp.neg_deposit_filter_id, tp.ext_bill_account, tp.credit, tp.ippool,dv.join_service, tp.tp_id FROM (dv_main dv) LEFT JOIN tarif_plans tp ON (dv.tp_id=tp.id AND tp.domain_id='0') LEFT JOIN users_nas un ON (un.uid = dv.uid) LEFT JOIN tp_nas ON (tp_nas.tp_id = tp.tp_id) LEFT JOIN intervals i ON (tp.tp_id = i.tp_id) WHERE dv.uid='1720'GROUP BY dv.uid;
res 1 (work)
+--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ | 1 | | 172.16.129.72 | 255.255.255.255 | 260 | 0 | | 0 | 0 | 0 | 0 | 114523 | 0 | 0 | 0 | 0 | 0 | 0 | 1298815877 | 1298757600 | 1 | 58 | 0 | 0 | 0 | 0.00 | | 1 | 0 | 0 | 0 | 0 | | 1 | 0.00 | 0 | 0 | 33 | +--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ 1 row in set (0.01 sec)
res 2 (not work)
+--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ | logins | if(dv.filter_id != '', dv.filter_id, if(tp.filter_id is null, '', tp.filter_id)) | if(dv.ip>0, INET_NTOA(dv.ip), 0) | INET_NTOA(dv.netmask) | tp_id | speed | cid | total_time_limit | day_time_limit | week_time_limit | month_time_limit | UNIX_TIMESTAMP(DATE_FORMAT(DATE_ADD(curdate(), INTERVAL 1 MONTH), '%Y-%m-01')) - UNIX_TIMESTAMP() | total_traf_limit | day_traf_limit | week_traf_limit | month_traf_limit | octets_direction | if (count(un.uid) + count(tp_nas.tp_id) = 0, 0, if (count(un.uid)>0, 1, 2)) | UNIX_TIMESTAMP() | UNIX_TIMESTAMP(DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP()), '%Y-%m-%d')) | DAYOFWEEK(FROM_UNIXTIME(UNIX_TIMESTAMP())) | DAYOFYEAR(FROM_UNIXTIME(UNIX_TIMESTAMP())) | disable | max_session_duration | payment_type | credit_tresshold | rad_pairs | count(i.id) | age | callback | port | traffic_transfer_period | neg_deposit_filter_id | ext_bill_account | credit | ippool | join_service | tp_id | +--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ | 1 | | 172.16.129.72 | 255.255.255.255 | 260 | 0 | | 0 | 0 | 0 | 0 | 115649 | 0 | 0 | 0 | 0 | 0 | 0 | 1298814751 | 1298757600 | 1 | 58 | 0 | 0 | 0 | 0.00 | | 1 | 0 | 0 | 0 | 0 | | 1 | 0.00 | 0 | 0 | 33 | +--------+----------------------------------------------------------------------------------+----------------------------------+-----------------------+-------+-------+-----+------------------+----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+------------------+----------------+-----------------+------------------+------------------+--------------------------------------------------------------------------------+------------------+--------------------------------------------------------------------------+--------------------------------------------+--------------------------------------------+---------+----------------------+--------------+------------------+-----------+-------------+------+----------+------+-------------------------+-----------------------+------------------+--------+--------+--------------+-------+ 1 row in set (0.00 sec)