mysqld.cc

在mysqld.cc里定义了所有的sql_mode.

还定义了记录各种统计状态信息的变量以及统计信息的类型;SHOW_VAR status_vars[]= {...);

mysql_init_variables: 初始化各种参数;

mysqld_get_one_option: 这个函数用来获得某个变量的值.

struct my_options定义了mysql里所有的my.cnf里的配置信息.

create_thread_to_handle_connection: 这个函数通过调用pthread_create方法为connection创建一个新线程. 同时设置thread_created, threads, wake_thread的值;

handle_connections_sockets()这个函数会调用create_new_thread(). 不知道create_new_thread()跟create_thread_to_handle_connection()有什么区别;

大概的方式是这样: 当用户请求登陆mysql的时候, mysql会去创建一个线程, 来处理这个连接所有的语句.

主要使用的文件有: mysqld.cc和sql_connect.cc;

具体的待续...

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7682812/viewspace-668427/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7682812/viewspace-668427/

2025-10-28T21:51:25.143820+08:00 61 [ERROR] InnoDB: Operating system error number 32 in a file operation. 2025-10-28T21:51:25.144814+08:00 61 [ERROR] InnoDB: The error means that another program is using InnoDB's files. This might be a backup or antivirus software or another instance of MySQL. Please close it to get rid of this error. 2025-10-28 21:51:35 0x4e50 InnoDB: Assertion failure in thread 20048 in file handler0alter.cc line 7404 InnoDB: Failing assertion: error == DB_SUCCESS 2025-10-28T21:51:35.146746+08:00 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 9706ms. The settings might not be optimal. (flushed=0 and evicted=0, during the time.) InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 13:51:35 UTC - mysqld got exception 0x80000003 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. Attempting to collect some information that could help diagnose the problem. As this is a crash and something is definitely wrong, the information collection process might fail. key_buffer_size=536870912 read_buffer_size=131072 max_used_connections=52 max_threads=600 thread_count=52 connection_count=52 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 761977 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x168dca9d300 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... 7ff657099812 mysqld.exe!my_sigabrt_handler()[my_thr_init.c:449] 7ff65743e349 mysqld.exe!raise()[winsig.c:587] 7ff65743d240 mysqld.exe!abort()[abort.c:82] 7ff657199b08 mysqld.exe!ut_dbg_assertion_failed()[ut0dbg.cc:67] 7ff65727f72f mysqld.exe!ha_innobase::commit_inplace_alter_table()[handler0alter.cc:8275] 7ff656a11443 mysqld.exe!mysql_inplace_alter_table()[sql_table.cc:7449] 7ff656a0f17a mysqld.exe!mysql_alter_table()[sql_table.cc:9538] 7ff656b3565e mysqld.exe!Sql_cmd_alter_table::execute()[sql_alter.cc:316] 7ff656996aa5 mysqld.exe!mysql_execute_command()[sql_parse.cc:3521] 7ff65699938a mysqld.exe!mysql_parse()[sql_parse.cc:5525] 7ff65699239d mysqld.exe!dispatch_command()[sql_parse.cc:1432] 7ff6569933aa mysqld.exe!do_command()[sql_parse.cc:999] 7ff6569581e4 mysqld.exe!handle_connection()[connection_handler_per_thread.cc:301] 7ff65737cd92 mysqld.exe!pfs_spawn_thread()[pfs.cc:2191] 7ff65709967b mysqld.exe!win_thread_start()[my_thread.c:38] 7ff65743ddbf mysqld.exe!_callthreadstartex()[threadex.c:376] 7ff65743e00a mysqld.exe!_threadstartex()[threadex.c:354] 7ffaba1f84d4 KERNEL32.DLL!BaseThreadInitThunk() 7ffabc6ee871 ntdll.dll!RtlUserThreadStart() Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (168df559740): ALTER TABLE formmain_0495 DROP COLUMN field0028 Connection ID (thread ID): 61 Status: NOT_KILLED The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.
10-29
terribly wrong... stack_bottom = 0x0 thread_stack 0x49000 mysys/stacktrace.c:175(my_print_stacktrace)[0x5623cfdb70ee] sql/signal_handler.cc:231(handle_fatal_signal)[0x5623cf80695f] sigaction.c:0(__restore_rt)[0x7f12f9a615f0] :0(__GI_raise)[0x7f12f96ba337] :0(__GI_abort)[0x7f12f96bba28] os/os0file.cc:5188(os_file_handle_error_cond_exit)[0x5623cfa1b8e5] include/os0file.inl:170(pfs_os_file_create_func)[0x5623cfbc1af5] fsp/fsp0sysspace.cc:452(SysTablespace::create_file(Datafile&))[0x5623cfbc7566] fsp/fsp0sysspace.cc:897(SysTablespace::open_or_create(bool, bool, unsigned long*, unsigned long*))[0x5623cfbc8822] srv/srv0start.cc:1694(srv_start(bool))[0x5623cfab7d86] handler/ha_innodb.cc:4377(innodb_init(void*))[0x5623cf9af8bf] sql/handler.cc:549(ha_initialize_handlerton(st_plugin_int*))[0x5623cf8090c4] sql/sql_plugin.cc:1435(plugin_initialize(st_mem_root*, st_plugin_int*, int*, char**, bool))[0x5623cf635820] sql/sql_plugin.cc:1717(plugin_init(int*, char**, int))[0x5623cf6369aa] sql/mysqld.cc:5472(init_server_components())[0x5623cf56488a] sql/mysqld.cc:6091(mysqld_main(int, char**))[0x5623cf56b07e] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f12f96a6505] /data/mces/mysql/bin/mysqld(+0x56c8e1)[0x5623cf55e8e1] The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains information that should help you find out what is causing the crash. Writing a core file... Working directory at /data/mces/data Resource Limits: Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 14989 14989 processes Max open files 10035 10035 files Max locked memory 65536 65536 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 14989 14989 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us Core pattern: core Kernel version: Linux version 3.10.0-1062.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Wed Aug 7 18:08:02 UTC 2019 250707 18:20:25 mysqld_safe mysqld from pid file /data/mces/mysql/mysqld.pid ended
07-08
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值