No Image

MySQL Fetch Cursor 문 사용방법

2016-04-05 KENNETH 1

출처 : http://bizadmin.tistory.com/entry/MySQL-Fetch-Cursor-%EB%AC%B8-%EC%82%AC%EC%9A%A9%EB%B0%A9%EB%B2%95 작성자 : 불가사리 bluemount 아래 내용은 ”http://bizadmin.tistory.com/”에서 발췌한 내용입니다.   Mysql에서 커서(Fetch Cursor)를 사용할 때 아래와 같은 경고메세지를 얻는 경우가 있다. 1329: No data – zero rows fetched, selected, or processed 무슨 이유인지 커서가 다 돌지를 않고 중간에 멈춘거 같은 것을 보고 역시  Mysql 은 믿을 수가 없어 그런 느낌을 갖기도 했지만 역시 믿을 수 없는 건 나의 실력이었다. Mysql 의 커서(Cursor)를 충분히 분석하고 기능을 알아보려 한다. 커서는 기본적으로 커서(Cursor)를 돌면 어떤 데이타를 처리하는 것이 목적이다. 간단한 예제 수준만 알아서 해결이 안되는 경우 아래의 내용을 검토해 보자. 1. Fetch Cursor 기본 구조  : 아주 기초적 구조다. 이해가 안되면 외어라. CREATE PROCEDURE curdemo() BEGIN DECLARE done INT DEFAULT FALSE; DECLARE vRowCount INT DEFAULT 0 ; DECLARE vUserID varchar(20);   — 커서로 만들 데이타 값들 DECLARE cur1 CURSOR FOR SELECT Userid FROM Member;   — 커서가 마지막에 도착할 때의 상태값 DECLARE CONTINUE HANDLER [ more… ]

No Image

mysql-5.7 Client Error Codes and Messages

2016-04-05 KENNETH 0

Client Error Codes and Messages Client error information comes from the following source files: The Error values and the symbols in parentheses correspond to definitions in the include/errmsg.h MySQL source file. The Message values correspond to the error messages that are listed in the libmysql/errmsg.c file. %d and %s represent numbers and strings, respectively, that are substituted into the messages when they are displayed. Because updates are frequent, it is possible that those files will contain additional error information not listed here. Error: 2000 (CR_UNKNOWN_ERROR) Message: Unknown MySQL error Error: 2001 (CR_SOCKET_CREATE_ERROR) Message: Can’t create UNIX socket (%d) Error: 2002 (CR_CONNECTION_ERROR) Message: Can’t connect to local MySQL server through socket ’%s’ (%d) Error: 2003 (CR_CONN_HOST_ERROR) Message: Can’t connect to MySQL server on ’%s’ (%d) Error: 2004 (CR_IPSOCK_ERROR) Message: Can’t create TCP/IP socket (%d) Error: 2005 (CR_UNKNOWN_HOST) Message: Unknown MySQL server [ more… ]

No Image

mysql-5.7 Server Error Codes and Messages

2016-04-05 KENNETH 0

Server Error Codes and Messages MySQL programs have access to several types of error information when the server returns an error. For example, the mysql client program displays errors using the following format: shell> SELECT * FROM no_such_table; ERROR 1146 (42S02): Table ‘test.no_such_table’ doesn’t exist The message displayed contains three types of information: A numeric error code (1146). This number is MySQL-specific and is not portable to other database systems. A five-character SQLSTATE value (’42S02′). The values are taken from ANSI SQL and ODBC and are more standardized. Not all MySQL error numbers have corresponding SQLSTATE values. In these cases, ‘HY000’ (general error) is used. A message string that provides a textual description of the error. For error checking, use error codes, not error messages. Error messages do not change often, but it is possible. Also if the database administrator [ more… ]

No Image

General Tablespaces in MySQL 5.7 – Details and Tips

2016-03-23 KENNETH 0

General Tablespaces in MySQL 5.7 – Details and Tips InnoDB in MySQL 5.7 introduced for the first time the ability to create a general tablespace and assign multiple tables to it.  These tablespaces can be assigned anywhere on the system.  They can even be assigned a smaller block size so that they can contain compressed tables that use that size as their key_block_size.… Source: General Tablespaces in MySQL 5.7 – Details and Tips

No Image

MySQL Utilities 1.6

2016-03-22 KENNETH 0

MySQL Utilities 1.6 MySQL Utilities 1.6 (1.6.3 beta, published on Tuesday, 22 Mar 2016) Source: MySQL Utilities 1.6