开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
1 Star 0 Fork 51

yangmain/MySQLAdvisor

forked from nwsuafzq/MySQLAdvisor
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (2)
master
develop
master
分支 (2)
master
develop
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (2)
master
develop
MySQLAdvisor
/
sql
/
log.cc
MySQLAdvisor
/
sql
/
log.cc
log.cc 36.97 KB
一键复制 编辑 原始数据 按行查看 历史
坚守 提交于 2017年03月06日 15:34 +08:00 . 初始化sqladvisor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2009, 2013, Monty Program Ab
Copyright (C) 2012 Percona Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
@file
@brief
logging of commands
@todo
Abort logging when we get an error in reading or writing log files
*/
#include "my_global.h" /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h"
#include "log.h"
#include "sql_base.h" // open_log_table
#include "sql_delete.h" // mysql_truncate
#include "sql_parse.h" // command_name
#include "sql_time.h" // calc_time_from_sec, my_time_compare
#include "sql_acl.h" // SUPER_ACL
#include "mysql/service_my_plugin_log.h"
#include "sp_head.h"
#include <my_dir.h>
#include <stdarg.h>
#include <m_ctype.h> // For test_if_number
#ifdef _WIN32
#include "message.h"
#endif
using std::min;
using std::max;
#include "sql_show.h"
#include "mysqld.h"
/* max size of the log message */
#define MAX_LOG_BUFFER_SIZE 1024
#define MAX_TIME_SIZE 32
#define MAX_USER_HOST_SIZE 512
static
const TABLE_FIELD_TYPE general_log_table_fields[GLT_FIELD_COUNT] =
{
{
{ C_STRING_WITH_LEN("event_time") },
{ C_STRING_WITH_LEN("timestamp") },
{ NULL, 0 }
},
{
{ C_STRING_WITH_LEN("user_host") },
{ C_STRING_WITH_LEN("mediumtext") },
{ C_STRING_WITH_LEN("utf8") }
},
{
{ C_STRING_WITH_LEN("thread_id") },
{ C_STRING_WITH_LEN("bigint(21) unsigned") },
{ NULL, 0 }
},
{
{ C_STRING_WITH_LEN("server_id") },
{ C_STRING_WITH_LEN("int(10) unsigned") },
{ NULL, 0 }
},
{
{ C_STRING_WITH_LEN("command_type") },
{ C_STRING_WITH_LEN("varchar(64)") },
{ C_STRING_WITH_LEN("utf8") }
},
{
{ C_STRING_WITH_LEN("argument") },
{ C_STRING_WITH_LEN("mediumtext") },
{ C_STRING_WITH_LEN("utf8") }
}
};
LOGGER logger;
static bool test_if_number(const char *str,
ulong *res, bool allow_wildcards);
/**
purge logs, master and slave sides both, related error code
convertor.
Called from @c purge_error_message(), @c MYSQL_BIN_LOG::reset_logs()
@param res an internal to purging routines error code
@return the user level error code ER_*
*/
uint purge_log_get_error_code(int res)
{
uint errcode= 0;
switch (res) {
case 0: break;
case LOG_INFO_EOF: errcode= ER_UNKNOWN_TARGET_BINLOG; break;
case LOG_INFO_IO: errcode= ER_IO_ERR_LOG_INDEX_READ; break;
case LOG_INFO_INVALID:errcode= ER_BINLOG_PURGE_PROHIBITED; break;
case LOG_INFO_SEEK: errcode= ER_FSEEK_FAIL; break;
case LOG_INFO_MEM: errcode= ER_OUT_OF_RESOURCES; break;
case LOG_INFO_FATAL: errcode= ER_BINLOG_PURGE_FATAL_ERR; break;
case LOG_INFO_IN_USE: errcode= ER_LOG_IN_USE; break;
case LOG_INFO_EMFILE: errcode= ER_BINLOG_PURGE_EMFILE; break;
default: errcode= ER_LOG_PURGE_UNKNOWN_ERR; break;
}
return errcode;
}
/**
Silence all errors and warnings reported when performing a write
to a log table.
Errors and warnings are not reported to the client or SQL exception
handlers, so that the presence of logging does not interfere and affect
the logic of an application.
*/
class Silence_log_table_errors : public Internal_error_handler
{
char m_message[MYSQL_ERRMSG_SIZE];
public:
Silence_log_table_errors()
{
m_message[0]= '0円';
}
virtual ~Silence_log_table_errors() {}
virtual bool handle_condition(THD *thd,
uint sql_errno,
const char* sql_state,
Sql_condition::enum_warning_level level,
const char* msg,
Sql_condition ** cond_hdl);
const char *message() const { return m_message; }
};
bool
Silence_log_table_errors::handle_condition(THD *,
uint,
const char*,
Sql_condition::enum_warning_level,
const char* msg,
Sql_condition ** cond_hdl)
{
*cond_hdl= NULL;
strmake(m_message, msg, sizeof(m_message)-1);
return TRUE;
}
sql_print_message_func sql_print_message_handlers[3] =
{
sql_print_information,
sql_print_warning,
sql_print_error
};
/**
Create the name of the log specified.
This method forms a new path + file name for the
log specified in @c name.
@param[IN] buff Location for building new string.
@param[IN] name Name of the log file.
@param[IN] log_ext The extension for the log (e.g. .log).
@returns Pointer to new string containing the name.
*/
char *make_log_name(char *buff, const char *name, const char* log_ext)
{
strmake(buff, name, FN_REFLEN-5);
return fn_format(buff, buff, mysql_real_data_home, log_ext,
MYF(MY_UNPACK_FILENAME|MY_REPLACE_EXT));
}
/* log event handlers */
bool Log_to_file_event_handler::
log_error(enum loglevel level, const char *format,
va_list args)
{
return vprint_msg_to_log(level, format, args);
}
void Log_to_file_event_handler::init_pthread_objects()
{
mysql_log.init_pthread_objects();
}
/**
Wrapper around MYSQL_LOG::write() for general log. We need it since we
want all log event handlers to have the same signature.
*/
bool Log_to_file_event_handler::
log_general(THD *thd, time_t event_time, const char *user_host,
uint user_host_len, my_thread_id thread_id,
const char *command_type, uint command_type_len,
const char *sql_text, uint sql_text_len,
const CHARSET_INFO *client_cs)
{
Silence_log_table_errors error_handler;
thd->push_internal_handler(&error_handler);
bool retval= mysql_log.write(event_time, user_host, user_host_len,
thread_id, command_type, command_type_len,
sql_text, sql_text_len);
thd->pop_internal_handler();
return retval;
}
bool Log_to_file_event_handler::init()
{
if (!is_initialized)
{
if (opt_log)
mysql_log.open_query_log(opt_logname);
is_initialized= TRUE;
}
return FALSE;
}
void Log_to_file_event_handler::cleanup()
{
mysql_log.cleanup();
}
void Log_to_file_event_handler::flush()
{
/* reopen log files */
if (opt_log)
mysql_log.reopen_file();
}
/*
Log error with all enabled log event handlers
SYNOPSIS
error_log_print()
level The level of the error significance: NOTE,
WARNING or ERROR.
format format string for the error message
args list of arguments for the format string
RETURN
FALSE - OK
TRUE - error occured
*/
bool LOGGER::error_log_print(enum loglevel level, const char *format,
va_list args)
{
bool error= FALSE;
Log_event_handler **current_handler;
/* currently we don't need locking here as there is no error_log table */
for (current_handler= error_log_handler_list ; *current_handler ;)
error= (*current_handler++)->log_error(level, format, args) || error;
return error;
}
void LOGGER::cleanup_base()
{
DBUG_ASSERT(inited == 1);
mysql_rwlock_destroy(&LOCK_logger);
if (file_log_handler)
file_log_handler->cleanup();
}
void LOGGER::cleanup_end()
{
DBUG_ASSERT(inited == 1);
if (file_log_handler)
{
delete file_log_handler;
file_log_handler=NULL;
}
inited= 0;
}
/**
Perform basic log initialization: create file-based log handler and
init error log.
*/
void LOGGER::init_base()
{
DBUG_ASSERT(inited == 0);
inited= 1;
/*
Here we create file log handler. We don't do it for the table log handler
here as it cannot be created so early. The reason is THD initialization,
which depends on the system variables (parsed later).
*/
if (!file_log_handler)
file_log_handler= new Log_to_file_event_handler;
/* by default we use traditional error log */
init_error_log(LOG_FILE);
file_log_handler->init_pthread_objects();
mysql_rwlock_init(key_rwlock_LOCK_logger, &LOCK_logger);
}
bool LOGGER::flush_logs(THD *thd)
{
int rc= 0;
/*
Now we lock logger, as nobody should be able to use logging routines while
log tables are closed
*/
logger.lock_exclusive();
/* reopen log files */
file_log_handler->flush();
/* end of log flush */
logger.unlock();
return rc;
}
/**
Close and reopen the general log (with locks).
@returns FALSE.
*/
bool LOGGER::flush_general_log()
{
/*
Now we lock logger, as nobody should be able to use logging routines while
log tables are closed
*/
logger.lock_exclusive();
/* Reopen general log file */
if (opt_log)
file_log_handler->get_mysql_log()->reopen_file();
/* End of log flush */
logger.unlock();
return 0;
}
bool LOGGER::general_log_write(THD *thd, enum enum_server_command command,
const char *query, uint query_length)
{
bool error= FALSE;
Log_event_handler **current_handler= general_log_handler_list;
char user_host_buff[MAX_USER_HOST_SIZE + 1];
uint user_host_len= 0;
time_t current_time;
DBUG_ASSERT(thd);
lock_shared();
if (!opt_log)
{
unlock();
return 0;
}
user_host_len= make_user_name(thd, user_host_buff);
current_time= my_time(0);
while (*current_handler)
error|= (*current_handler++)->
log_general(thd, current_time, user_host_buff,
user_host_len, thd->thread_id,
command_name[(uint) command].str,
command_name[(uint) command].length,
query, query_length,
thd->variables.character_set_client) || error;
unlock();
return error;
}
bool LOGGER::general_log_print(THD *thd, enum enum_server_command command,
const char *format, va_list args)
{
uint message_buff_len= 0;
char message_buff[MAX_LOG_BUFFER_SIZE];
/* prepare message */
if (format)
message_buff_len= my_vsnprintf(message_buff, sizeof(message_buff),
format, args);
else
message_buff[0]= '0円';
/* Print the message to the buffer if we want to log this kind of commands */
if (! logger.log_command(thd, command))
return FALSE;
return general_log_write(thd, command, message_buff, message_buff_len);
}
void LOGGER::init_error_log(uint error_log_printer)
{
if (error_log_printer & LOG_NONE)
{
error_log_handler_list[0]= 0;
return;
}
switch (error_log_printer) {
case LOG_FILE:
error_log_handler_list[0]= file_log_handler;
error_log_handler_list[1]= 0;
break;
/* these two are disabled for now */
case LOG_TABLE:
DBUG_ASSERT(0);
break;
case LOG_TABLE|LOG_FILE:
DBUG_ASSERT(0);
break;
}
}
void LOGGER::init_general_log(uint general_log_printer)
{
if (general_log_printer & LOG_NONE)
{
general_log_handler_list[0]= 0;
return;
}
switch (general_log_printer) {
case LOG_FILE:
general_log_handler_list[0]= file_log_handler;
general_log_handler_list[1]= 0;
break;
case LOG_TABLE:
general_log_handler_list[0]= 0;
break;
case LOG_TABLE|LOG_FILE:
general_log_handler_list[0]= file_log_handler;
general_log_handler_list[1]= 0;
break;
}
}
bool LOGGER::activate_log_handler(THD* thd, uint log_type)
{
MYSQL_QUERY_LOG *file_log;
bool res= FALSE;
lock_exclusive();
switch (log_type) {
case QUERY_LOG_GENERAL:
if (!opt_log)
{
file_log= file_log_handler->get_mysql_log();
file_log->open_query_log(opt_logname);
init_general_log(log_output_options);
opt_log= TRUE;
}
break;
default:
DBUG_ASSERT(0);
}
unlock();
return res;
}
void LOGGER::deactivate_log_handler(THD *thd, uint log_type)
{
my_bool *tmp_opt= 0;
MYSQL_LOG *file_log= NULL;
switch (log_type) {
case QUERY_LOG_GENERAL:
tmp_opt= &opt_log;
file_log= file_log_handler->get_mysql_log();
break;
default:
MY_ASSERT_UNREACHABLE();
}
if (!(*tmp_opt))
return;
lock_exclusive();
file_log->close(0);
*tmp_opt= FALSE;
unlock();
}
/* the parameters are unused for the log tables */
bool Log_to_csv_event_handler::init()
{
return 0;
}
int LOGGER::set_handlers(uint error_log_printer,
uint general_log_printer)
{
/* error log table is not supported yet */
DBUG_ASSERT(error_log_printer < LOG_TABLE);
lock_exclusive();
if ((general_log_printer & LOG_TABLE) &&
!is_log_tables_initialized)
{
general_log_printer= (general_log_printer & ~LOG_TABLE) | LOG_FILE;
sql_print_error("Failed to initialize log tables. "
"Falling back to the old-fashioned logs");
}
init_error_log(error_log_printer);
init_general_log(general_log_printer);
unlock();
return 0;
}
#ifdef _WIN32
static int eventSource = 0;
static void setup_windows_event_source()
{
HKEY hRegKey= NULL;
DWORD dwError= 0;
TCHAR szPath[MAX_PATH];
DWORD dwTypes;
if (eventSource) // Ensure that we are only called once
return;
eventSource= 1;
// Create the event source registry key
dwError= RegCreateKey(HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\MySQL",
&hRegKey);
/* Name of the PE module that contains the message resource */
GetModuleFileName(NULL, szPath, MAX_PATH);
/* Register EventMessageFile */
dwError = RegSetValueEx(hRegKey, "EventMessageFile", 0, REG_EXPAND_SZ,
(PBYTE) szPath, (DWORD) (strlen(szPath) + 1));
/* Register supported event types */
dwTypes= (EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
EVENTLOG_INFORMATION_TYPE);
dwError= RegSetValueEx(hRegKey, "TypesSupported", 0, REG_DWORD,
(LPBYTE) &dwTypes, sizeof dwTypes);
RegCloseKey(hRegKey);
}
#endif /* _WIN32 */
/**
Find a unique filename for 'filename.#'.
Set '#' to the number next to the maximum found in the most
recent log file extension.
This function will return nonzero if: (i) the generated name
exceeds FN_REFLEN; (ii) if the number of extensions is exhausted;
or (iii) some other error happened while examining the filesystem.
@return
nonzero if not possible to get unique filename.
*/
static int find_uniq_filename(char *name, ulong *next)
{
uint i;
char buff[FN_REFLEN], ext_buf[FN_REFLEN];
struct st_my_dir *dir_info;
reg1 struct fileinfo *file_info;
ulong max_found= 0, number= 0;
size_t buf_length, length;
char *start, *end;
int error= 0;
DBUG_ENTER("find_uniq_filename");
*next= 0;
length= dirname_part(buff, name, &buf_length);
start= name + length;
end= strend(start);
*end='.';
length= (size_t) (end - start + 1);
if ((DBUG_EVALUATE_IF("error_unique_log_filename", 1,
!(dir_info= my_dir(buff,MYF(MY_DONT_SORT))))))
{ // This shouldn't happen
strmov(end,".1"); // use name+1
DBUG_RETURN(1);
}
file_info= dir_info->dir_entry;
for (i= dir_info->number_off_files ; i-- ; file_info++)
{
if (memcmp(file_info->name, start, length) == 0 &&
test_if_number(file_info->name+length, &number,0))
{
set_if_bigger(max_found,(ulong) number);
}
}
my_dirend(dir_info);
/* check if reached the maximum possible extension number */
if (max_found == MAX_LOG_UNIQUE_FN_EXT)
{
sql_print_error("Log filename extension number exhausted: %06lu. \
Please fix this by archiving old logs and \
updating the index files.", max_found);
error= 1;
goto end;
}
*next= max_found + 1;
if (sprintf(ext_buf, "%06lu", *next) < 0)
{
error= 1;
goto end;
}
*end++='.';
/*
Check if the generated extension size + the file name exceeds the
buffer size used. If one did not check this, then the filename might be
truncated, resulting in error.
*/
if (((strlen(ext_buf) + (end - name)) >= FN_REFLEN))
{
sql_print_error("Log filename too large: %s%s (%zu). \
Please fix this by archiving old logs and updating the \
index files.", name, ext_buf, (strlen(ext_buf) + (end - name)));
error= 1;
goto end;
}
if (sprintf(end, "%06lu", *next)<0)
{
error= 1;
goto end;
}
/* print warning if reaching the end of available extensions. */
if ((*next > (MAX_LOG_UNIQUE_FN_EXT - LOG_WARN_UNIQUE_FN_EXT_LEFT)))
sql_print_warning("Next log extension: %lu. \
Remaining log filename extensions: %lu. \
Please consider archiving some logs.", *next, (MAX_LOG_UNIQUE_FN_EXT - *next));
end:
DBUG_RETURN(error);
}
void MYSQL_LOG::init(enum_log_type log_type_arg,
enum cache_type io_cache_type_arg)
{
DBUG_ENTER("MYSQL_LOG::init");
log_type= log_type_arg;
io_cache_type= io_cache_type_arg;
DBUG_PRINT("info",("log_type: %d", log_type));
DBUG_VOID_RETURN;
}
bool MYSQL_LOG::init_and_set_log_file_name(const char *log_name,
const char *new_name,
enum_log_type log_type_arg,
enum cache_type io_cache_type_arg,
bool unique)
{
init(log_type_arg, io_cache_type_arg);
if (new_name && !strmov(log_file_name, new_name))
return TRUE;
else if (!new_name && generate_new_name(log_file_name, log_name, unique))
return TRUE;
return FALSE;
}
/*
Open a (new) log file.
SYNOPSIS
open()
log_name The name of the log to open
log_type_arg The type of the log. E.g. LOG_NORMAL
new_name The new name for the logfile. This is only needed
when the method is used to open the binlog file.
io_cache_type_arg The type of the IO_CACHE to use for this log file
DESCRIPTION
Open the logfile, init IO_CACHE and write startup messages
(in case of general and slow query logs).
RETURN VALUES
0 ok
1 error
*/
bool MYSQL_LOG::open(
#ifdef HAVE_PSI_INTERFACE
PSI_file_key log_file_key,
#endif
const char *log_name, enum_log_type log_type_arg,
const char *new_name, enum cache_type io_cache_type_arg,
bool unique)
{
char buff[FN_REFLEN];
MY_STAT f_stat;
File file= -1;
my_off_t pos= 0;
int open_flags= O_CREAT | O_BINARY;
DBUG_ENTER("MYSQL_LOG::open");
DBUG_PRINT("enter", ("log_type: %d", (int) log_type_arg));
write_error= 0;
if (!(name= my_strdup(log_name, MYF(MY_WME))))
{
name= (char *)log_name; // for the error message
goto err;
}
if (init_and_set_log_file_name(name, new_name,
log_type_arg, io_cache_type_arg, unique) ||
DBUG_EVALUATE_IF("fault_injection_init_name", log_type == LOG_BIN, 0))
goto err;
/* File is regular writable file */
if (my_stat(log_file_name, &f_stat, MYF(0)) && !MY_S_ISREG(f_stat.st_mode))
goto err;
if (io_cache_type == SEQ_READ_APPEND)
open_flags |= O_RDWR | O_APPEND;
else
open_flags |= O_WRONLY | (log_type == LOG_BIN ? 0 : O_APPEND);
db[0]= 0;
#ifdef HAVE_PSI_INTERFACE
/* Keep the key for reopen */
m_log_file_key= log_file_key;
#endif
if ((file= mysql_file_open(log_file_key,
log_file_name, open_flags,
MYF(MY_WME | ME_WAITTANG))) < 0)
goto err;
if ((pos= mysql_file_tell(file, MYF(MY_WME))) == MY_FILEPOS_ERROR)
{
if (my_errno == ESPIPE)
pos= 0;
else
goto err;
}
if (init_io_cache(&log_file, file, IO_SIZE, io_cache_type, pos, 0,
MYF(MY_WME | MY_NABP |
((log_type == LOG_BIN) ? MY_WAIT_IF_FULL : 0))))
goto err;
if (log_type == LOG_NORMAL)
{
char *end;
int len=my_snprintf(buff, sizeof(buff), "%s, Version: %s (%s). "
#ifdef EMBEDDED_LIBRARY
"embedded library\n",
my_progname, server_version, MYSQL_COMPILATION_COMMENT
#elif _WIN32
"started with:\nTCP Port: %d, Named Pipe: %s\n",
my_progname, server_version, MYSQL_COMPILATION_COMMENT,
mysqld_port, mysqld_unix_port
#else
"started with:\n=\n",
my_progname, server_version, MYSQL_COMPILATION_COMMENT
#endif
);
end= strnmov(buff + len, "Time Id Command Argument\n",
sizeof(buff) - len);
if (my_b_write(&log_file, (uchar*) buff, (uint) (end-buff)) ||
flush_io_cache(&log_file))
goto err;
}
log_state= LOG_OPENED;
DBUG_RETURN(0);
err:
if (log_type == LOG_BIN)
{
THD *thd= current_thd;
/*
On fatal error when code enters here we should forcefully clear the
previous errors so that a new critical error message can be pushed
to the client side.
*/
thd->clear_error();
my_error(ER_BINLOG_LOGGING_IMPOSSIBLE, MYF(0), "Either disk is full or "
"file system is read only while opening the binlog. Aborting the "
"server");
_exit(EXIT_FAILURE);
}
else
sql_print_error("Could not open %s for logging (error %d). "
"Turning logging off for the whole duration "
"of the MySQL server process. To turn it on "
"again: fix the cause, shutdown the MySQL "
"server and restart it.",
name, errno);
if (file >= 0)
mysql_file_close(file, MYF(0));
end_io_cache(&log_file);
my_free(name);
name= NULL;
log_state= LOG_CLOSED;
DBUG_RETURN(1);
}
MYSQL_LOG::MYSQL_LOG()
: name(0), write_error(FALSE), inited(FALSE), log_type(LOG_UNKNOWN),
log_state(LOG_CLOSED),
cur_log_ext(-1)
#ifdef HAVE_PSI_INTERFACE
, m_key_LOCK_log(key_LOG_LOCK_log)
#endif
{
/*
We don't want to initialize LOCK_Log here as such initialization depends on
safe_mutex (when using safe_mutex) which depends on MY_INIT(), which is
called only in main(). Doing initialization here would make it happen
before main().
*/
memset(&log_file, 0, sizeof(log_file));
}
void MYSQL_LOG::init_pthread_objects()
{
DBUG_ASSERT(inited == 0);
inited= 1;
mysql_mutex_init(m_key_LOCK_log, &LOCK_log, MY_MUTEX_INIT_SLOW);
}
/*
Close the log file
SYNOPSIS
close()
exiting Bitmask. For the slow and general logs the only used bit is
LOG_CLOSE_TO_BE_OPENED. This is used if we intend to call
open at once after close.
NOTES
One can do an open on the object at once after doing a close.
The internal structures are not freed until cleanup() is called
*/
void MYSQL_LOG::close(uint exiting)
{ // One can't set log_type here!
DBUG_ENTER("MYSQL_LOG::close");
DBUG_PRINT("enter",("exiting: %d", (int) exiting));
if (log_state == LOG_OPENED)
{
end_io_cache(&log_file);
if (mysql_file_sync(log_file.file, MYF(MY_WME)) && ! write_error)
{
char errbuf[MYSYS_STRERROR_SIZE];
write_error= 1;
sql_print_error(ER_DEFAULT(ER_ERROR_ON_WRITE), name, errno,
my_strerror(errbuf, sizeof(errbuf), errno));
}
if (mysql_file_close(log_file.file, MYF(MY_WME)) && ! write_error)
{
char errbuf[MYSYS_STRERROR_SIZE];
write_error= 1;
sql_print_error(ER_DEFAULT(ER_ERROR_ON_WRITE), name, errno,
my_strerror(errbuf, sizeof(errbuf), errno));
}
}
log_state= (exiting & LOG_CLOSE_TO_BE_OPENED) ? LOG_TO_BE_OPENED : LOG_CLOSED;
my_free(name);
name= NULL;
DBUG_VOID_RETURN;
}
/** This is called only once. */
void MYSQL_LOG::cleanup()
{
DBUG_ENTER("cleanup");
if (inited)
{
inited= 0;
mysql_mutex_destroy(&LOCK_log);
close(0);
}
DBUG_VOID_RETURN;
}
int MYSQL_LOG::generate_new_name(char *new_name, const char *log_name,
bool unique)
{
fn_format(new_name, log_name, mysql_data_home, "", 4);
if (unique)
{
if (!fn_ext(log_name)[0])
{
if (find_uniq_filename(new_name, &cur_log_ext))
{
my_printf_error(ER_NO_UNIQUE_LOGFILE, ER(ER_NO_UNIQUE_LOGFILE),
MYF(ME_FATALERROR), log_name);
sql_print_error(ER(ER_NO_UNIQUE_LOGFILE), log_name);
return 1;
}
}
}
return 0;
}
int MYSQL_LOG::purge_up_to(ulong to_ext, const char *log_name)
{
char buff[FN_REFLEN];
int error= 0;
DBUG_ENTER("MYSQL_LOG::purge_up_to");
do {
snprintf(buff, sizeof(buff), "%s.%06lu", name, to_ext);
if ((error= unlink(buff)))
{
if (my_errno == ENOENT)
error= 0;
break;
}
--to_ext;
} while (to_ext > 0);
DBUG_RETURN(error);
}
/*
Reopen the log file
SYNOPSIS
reopen_file()
DESCRIPTION
Reopen the log file. The method is used during FLUSH LOGS
and locks LOCK_log mutex
*/
void MYSQL_QUERY_LOG::reopen_file()
{
char *save_name;
DBUG_ENTER("MYSQL_LOG::reopen_file");
if (!is_open())
{
DBUG_PRINT("info",("log is closed"));
DBUG_VOID_RETURN;
}
mysql_mutex_lock(&LOCK_log);
save_name= name;
name= 0; // Don't free name
close(LOG_CLOSE_TO_BE_OPENED);
/*
Note that at this point, log_state != LOG_CLOSED (important for is_open()).
*/
open(
#ifdef HAVE_PSI_INTERFACE
m_log_file_key,
#endif
save_name, log_type, 0, io_cache_type, false);
my_free(save_name);
mysql_mutex_unlock(&LOCK_log);
DBUG_VOID_RETURN;
}
/*
Write a command to traditional general log file
SYNOPSIS
write()
event_time command start timestamp
user_host the pointer to the string with user@host info
user_host_len length of the user_host string. this is computed once
and passed to all general log event handlers
thread_id Id of the thread, issued a query
command_type the type of the command being logged
command_type_len the length of the string above
sql_text the very text of the query being executed
sql_text_len the length of sql_text string
DESCRIPTION
Log given command to to normal (not rotable) log file
RETURN
FASE - OK
TRUE - error occured
*/
bool MYSQL_QUERY_LOG::write(time_t event_time, const char *user_host,
uint user_host_len, my_thread_id thread_id,
const char *command_type, uint command_type_len,
const char *sql_text, uint sql_text_len)
{
char buff[32];
uint length= 0;
char local_time_buff[MAX_TIME_SIZE];
struct tm start;
uint time_buff_len= 0;
mysql_mutex_lock(&LOCK_log);
/* Test if someone closed between the is_open test and lock */
if (is_open())
{
/* for testing output of timestamp and thread id */
DBUG_EXECUTE_IF("reset_log_last_time", last_time= 0;);
/* Note that my_b_write() assumes it knows the length for this */
if (event_time != last_time)
{
last_time= event_time;
localtime_r(&event_time, &start);
time_buff_len= my_snprintf(local_time_buff, MAX_TIME_SIZE,
"%02d%02d%02d %2d:%02d:%02d\t",
start.tm_year % 100, start.tm_mon + 1,
start.tm_mday, start.tm_hour,
start.tm_min, start.tm_sec);
if (my_b_write(&log_file, (uchar*) local_time_buff, time_buff_len))
goto err;
}
else
if (my_b_write(&log_file, (uchar*) "\t\t" ,2) < 0)
goto err;
length= my_snprintf(buff, 32, "%5lu ", thread_id);
if (my_b_write(&log_file, (uchar*) buff, length))
goto err;
if (my_b_write(&log_file, (uchar*) command_type, command_type_len))
goto err;
if (my_b_write(&log_file, (uchar*) "\t", 1))
goto err;
/* sql_text */
if (my_b_write(&log_file, (uchar*) sql_text, sql_text_len))
goto err;
if (my_b_write(&log_file, (uchar*) "\n", 1) ||
flush_io_cache(&log_file))
goto err;
}
mysql_mutex_unlock(&LOCK_log);
return FALSE;
err:
if (!write_error)
{
char errbuf[MYSYS_STRERROR_SIZE];
write_error= 1;
sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno,
my_strerror(errbuf, sizeof(errbuf), errno));
}
mysql_mutex_unlock(&LOCK_log);
return TRUE;
}
int MYSQL_QUERY_LOG::rotate(ulong max_size, bool *need_purge)
{
int error;
DBUG_ENTER("MYSQL_QUERY_LOG::rotate");
*need_purge= false;
if (my_b_tell(&log_file) > max_size)
{
if ((error= new_file()))
DBUG_RETURN(error);
*need_purge= true;
}
DBUG_RETURN(0);
}
int MYSQL_QUERY_LOG::new_file()
{
int error= 0, close_on_error= FALSE;
char new_name[FN_REFLEN], *old_name;
DBUG_ENTER("MYSQL_QUERY_LOG::new_file");
if (!is_open())
{
DBUG_PRINT("info",("log is closed"));
DBUG_RETURN(error);
}
mysql_mutex_assert_owner(&LOCK_log);
if (cur_log_ext == (ulong)-1)
{
strcpy(new_name, name);
if ((error= generate_new_name(new_name, name, true)))
goto end;
}
else
{
if (cur_log_ext == MAX_LOG_UNIQUE_FN_EXT)
{
error= 1;
goto end;
}
snprintf(new_name, sizeof(new_name), "%s.%06lu", name, ++cur_log_ext);
}
/*
close will try to free name and zero name pointer,
We saving current name value and zeroing the pointer to
prvent it.
*/
old_name= name;
name= NULL;
close(LOG_CLOSE_TO_BE_OPENED);
name= old_name;
error= open(
#ifdef HAVE_PSI_INTERFACE
key_file_query_log,
#endif
name,
LOG_NORMAL, new_name, WRITE_CACHE, false);
my_free(old_name);
end:
if (error && close_on_error /* rotate or reopen failed */)
{
sql_print_error("Could not open %s for logging (error %d). "
"Turning logging off for the whole duration "
"of the MySQL server process. To turn it on "
"again: fix the cause, shutdown the MySQL "
"server and restart it.",
new_name, errno);
}
DBUG_RETURN(error);
}
/**
@todo
The following should be using fn_format(); We just need to
first change fn_format() to cut the file name if it's too long.
*/
const char *MYSQL_LOG::generate_name(const char *log_name,
const char *suffix,
bool strip_ext, char *buff)
{
if (!log_name || !log_name[0])
{
strmake(buff, pidfile_name, FN_REFLEN - strlen(suffix) - 1);
return (const char *)
fn_format(buff, buff, "", suffix, MYF(MY_REPLACE_EXT|MY_REPLACE_DIR));
}
// get rid of extension if the log is binary to avoid problems
if (strip_ext)
{
char *p= fn_ext(log_name);
uint length= (uint) (p - log_name);
strmake(buff, log_name, min<size_t>(length, FN_REFLEN-1));
return (const char*)buff;
}
return log_name;
}
int error_log_print(enum loglevel level, const char *format,
va_list args)
{
return logger.error_log_print(level, format, args);
}
bool LOGGER::log_command(THD *thd, enum enum_server_command command)
{
/*
Log command if we have at least one log event handler enabled and want
to log this king of commands
*/
if (*general_log_handler_list && (what_to_log & (1L << (uint) command)))
{
if ((thd->variables.option_bits & OPTION_LOG_OFF))
{
/* No logging */
return FALSE;
}
return TRUE;
}
return FALSE;
}
bool general_log_print(THD *thd, enum enum_server_command command,
const char *format, ...)
{
va_list args;
uint error= 0;
va_start(args, format);
error= logger.general_log_print(thd, command, format, args);
va_end(args);
return error;
}
bool general_log_write(THD *thd, enum enum_server_command command,
const char *query, uint query_length)
{
/* Write the message to the log if we want to log this king of commands */
if (logger.log_command(thd, command))
return logger.general_log_write(thd, command, query, query_length);
return FALSE;
}
/**
Check if a string is a valid number.
@param str String to test
@param res Store value here
@param allow_wildcards Set to 1 if we should ignore '%' and '_'
@note
For the moment the allow_wildcards argument is not used
Should be move to some other file.
@retval
1 String is a number
@retval
0 String is not a number
*/
static bool test_if_number(register const char *str,
ulong *res, bool allow_wildcards)
{
reg2 int flag;
const char *start;
DBUG_ENTER("test_if_number");
flag=0; start=str;
while (*str++ == ' ') ;
if (*--str == '-' || *str == '+')
str++;
while (my_isdigit(files_charset_info,*str) ||
(allow_wildcards && (*str == wild_many || *str == wild_one)))
{
flag=1;
str++;
}
if (*str == '.')
{
for (str++ ;
my_isdigit(files_charset_info,*str) ||
(allow_wildcards && (*str == wild_many || *str == wild_one)) ;
str++, flag=1) ;
}
if (*str != 0 || flag == 0)
DBUG_RETURN(0);
if (res)
*res=atol(start);
DBUG_RETURN(1); /* Number ok */
} /* test_if_number */
void sql_perror(const char *message)
{
#ifdef HAVE_STRERROR
sql_print_error("%s: %s",message, strerror(errno));
#else
perror(message);
#endif
}
#ifdef _WIN32
static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
size_t length, size_t buffLen)
{
HANDLE event;
char *buffptr= buff;
DBUG_ENTER("print_buffer_to_nt_eventlog");
/* Add ending CR/LF's to string, overwrite last chars if necessary */
strmov(buffptr+min(length, buffLen-5), "\r\n\r\n");
setup_windows_event_source();
if ((event= RegisterEventSource(NULL,"MySQL")))
{
switch (level) {
case ERROR_LEVEL:
ReportEvent(event, EVENTLOG_ERROR_TYPE, 0, MSG_DEFAULT, NULL, 1, 0,
(LPCSTR*)&buffptr, NULL);
break;
case WARNING_LEVEL:
ReportEvent(event, EVENTLOG_WARNING_TYPE, 0, MSG_DEFAULT, NULL, 1, 0,
(LPCSTR*) &buffptr, NULL);
break;
case INFORMATION_LEVEL:
ReportEvent(event, EVENTLOG_INFORMATION_TYPE, 0, MSG_DEFAULT, NULL, 1,
0, (LPCSTR*) &buffptr, NULL);
break;
}
DeregisterEventSource(event);
}
DBUG_VOID_RETURN;
}
#endif /* _WIN32 */
#ifndef EMBEDDED_LIBRARY
static void print_buffer_to_file(enum loglevel level, const char *buffer,
size_t length)
{
time_t skr;
struct tm tm_tmp;
struct tm *start;
DBUG_ENTER("print_buffer_to_file");
DBUG_PRINT("enter",("buffer: %s", buffer));
mysql_mutex_lock(&LOCK_error_log);
skr= my_time(0);
localtime_r(&skr, &tm_tmp);
start=&tm_tmp;
fprintf(stderr, "%d-%02d-%02d %02d:%02d:%02d %lu [%s] %.*s\n",
start->tm_year + 1900,
start->tm_mon + 1,
start->tm_mday,
start->tm_hour,
start->tm_min,
start->tm_sec,
current_pid,
(level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ?
"Warning" : "Note"),
(int) length, buffer);
fflush(stderr);
mysql_mutex_unlock(&LOCK_error_log);
DBUG_VOID_RETURN;
}
/**
Prints a printf style message to the error log and, under NT, to the
Windows event log.
This function prints the message into a buffer and then sends that buffer
to other functions to write that message to other logging sources.
@param level The level of the msg significance
@param format Printf style format of message
@param args va_list list of arguments for the message
@returns
The function always returns 0. The return value is present in the
signature to be compatible with other logging routines, which could
return an error (e.g. logging to the log tables)
*/
int vprint_msg_to_log(enum loglevel level, const char *format, va_list args)
{
char buff[1024];
size_t length;
DBUG_ENTER("vprint_msg_to_log");
length= my_vsnprintf(buff, sizeof(buff), format, args);
print_buffer_to_file(level, buff, length);
#ifdef _WIN32
print_buffer_to_nt_eventlog(level, buff, length, sizeof(buff));
#endif
DBUG_RETURN(0);
}
#endif /* EMBEDDED_LIBRARY */
void sql_print_error(const char *format, ...)
{
va_list args;
DBUG_ENTER("sql_print_error");
va_start(args, format);
error_log_print(ERROR_LEVEL, format, args);
va_end(args);
DBUG_VOID_RETURN;
}
void sql_print_warning(const char *format, ...)
{
va_list args;
DBUG_ENTER("sql_print_warning");
va_start(args, format);
error_log_print(WARNING_LEVEL, format, args);
va_end(args);
DBUG_VOID_RETURN;
}
void sql_print_information(const char *format, ...)
{
va_list args;
DBUG_ENTER("sql_print_information");
va_start(args, format);
error_log_print(INFORMATION_LEVEL, format, args);
va_end(args);
DBUG_VOID_RETURN;
}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

MySQLAdvisor是原SQLAdvisor项目转移到此,原先由美团点评公司技术工程部DBA团队(北京)开发维护的一个分析SQL给出索引优化建议的工具,现在由社区进行维护、迭代更新。它基于MySQL原生态词法解析,结合分析SQL中的where条件、聚合条件、多表Join关系 给出索引优化建议
暂无标签
GPL-2.0
使用 GPL-2.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/yangsir/MySQLAdvisor.git
git@gitee.com:yangsir/MySQLAdvisor.git
yangsir
MySQLAdvisor
MySQLAdvisor
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /