pchero on July 27th, 2011

  mysql 라이브러리를 이용한 MySQL C 프로그램에서 이상한 로그를 발견했다.   mysql_query()  함수 결과를 수행한 결과값이 1이 나왔던 것. mysql_query() 에 관한 명세는 다음 링크에서 찾을 수 있었다. http://dev.mysql.com/doc/refman/5.0/en/mysql-query.html   이 중, Return Value와 관계있는 항목을 아래에 나타내었다. Return Values Zero if the statement was successful. Nonzero if an error occurred. 정상일 경우 0, 실패일 […]

Continue reading about mysql_query() return 1

pchero on July 26th, 2011

  사내에서 개발중인 제품을 테스트하기 위해 컴파일을 하던 도중, 아래의 오류를 발견했다. mysqlclient 라이브러리를 함께 사용하는 부분이 있었는데, Linking 을 하던 도중 에러가 발생한 것이다. /usr/lib/mysql/libmysqlclient.a(client.o): In function `mysql_close_free_options’: (.text+0xd7d): undefined reference to `SSL_CTX_free’ /usr/lib/mysql/libmysqlclient.a(client.o): In function `mysql_get_ssl_cipher’: (.text+0x1081): undefined reference to `SSL_get_current_cipher’ /usr/lib/mysql/libmysqlclient.a(client.o): In function `mysql_real_connect’: (.text+0x3a4c): undefined reference to `SSL_get_peer_certificate’ /usr/lib/mysql/libmysqlclient.a(client.o): In function […]

Continue reading about undefined reference to `SSL_CTX_free’

pchero on July 25th, 2011

  Stack Overflow 에서 상당히 유용한 스레드를 발견하여 이곳에 싣는다. 내용은 멀티 스레드 환경에서 네트워크 프로그램을 디버그 할 때 어떻게 gdb를 사용하는가? 이다.   Enable core dump saving in your environment. Run command ulimit -c unlimited and rerun your program. When it crashes, load generated core dump in gdb and look backtraces of crash. In […]

Continue reading about How to use gdb in Multi Threaded Network Program

pchero on July 25th, 2011

  Ubuntu 11.04 Kernel Version Linux localhost.localdomain 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:53:09 EST 2011 i686 i686 i386 GNU/Linux 환경에서 Virtual Box 를 구동하려고 하니 다음과 같은 에러메시지가 나타났다. “Failed to start the virtual machine WindowsXP. Failed to open/create the internal network ‘HostInterfaceNetworking-eth0’ (you might need to modprobe vboxnetflt to make it accessible) (VERR_SUPDRV_COMPONENT_NOT_FOUND). […]

Continue reading about Ubuntu Virtual Box Start Error

pchero on June 30th, 2011

1. MySQL 시작하기 MySQL 구동 하기. $ /etc/init.d/mysql start   MySQL 접속하기 $ mysql -uroot -p1234567890 -u 다음에는 접속하고자 하는 ID, -p 다음에는 접속하고자 하는 계정의 패스워드를 입력한다.   MySQL에서 데이터 베이스 생성하기 mysql> create database test; 생성한 데이터 베이스 확인하기 mysql> show databases;   MySQL에서 데이터 베이스 선택하기 mysql> use test; use 다음에 사용하고자 […]

Continue reading about MySQL : Project(MySQL 연동) 3 – 기초