Loading...
MySQL 9.5 Reference Manual 9.5의 25.5.10 ndb_drop_index — Drop Index from an NDB Table의 한국어 번역본입니다.
아래의 경우에 피드백에서 신고해주신다면 반영하겠습니다.
감사합니다 :)
ndb_drop_index는 지정한 index를 NDB 테이블에서 삭제합니다. 이 유틸리티는 NDB API application을 작성하기 위한 예제로만 사용할 것을 권장합니다. 자세한 내용은 이 절 뒤쪽의 Warning을 참조하십시오.
1ndb_drop_index -c connection_string table_name index -d db_name
위에 표시된 statement는 database 안의 table 에서 index 라는 이름의 index를 삭제합니다.
ndb_drop_index와 함께 사용할 수 있는 옵션들은 다음 표에 나와 있습니다. 각 옵션에 대한 추가 설명은 표 뒤에 이어집니다.
| Property | Value |
|---|---|
| Command-Line Format | --character-sets-dir=path |
character set이 들어 있는 디렉터리입니다.
| Property | Value |
|---|---|
| Command-Line Format | --connect-retries=# |
| Type | Integer |
| Default Value | 12 |
| Minimum Value | 0 |
| Maximum Value | 12 |
포기하기 전에 커넥션을 다시 시도하는 횟수입니다.
| Property | Value |
|---|---|
| Command-Line Format | --connect-retry-delay=# |
| Type | Integer |
| Default Value | 5 |
| Minimum Value | 0 |
| Maximum Value | 5 |
매니지먼트 서버에 접속을 시도하는 각 시도 사이에 대기할 초 단위 시간입니다.
| Property | Value |
|---|---|
| Command-Line Format | --connect-string=connection_string |
| Type | String |
| Default Value | [none] |
--ndb-connectstring과 동일합니다.
| Property | Value |
|---|---|
| Command-Line Format | --core-file |
에러 발생 시 코어 파일을 기록합니다. 디버깅에 사용됩니다.
--database, -d| Property | Value |
|---|---|
| Command-Line Format | --database=name |
| Type | String |
| Default Value | TEST_DB |
테이블이 존재하는 데이터베이스의 이름입니다.
| Property | Value |
|---|---|
| Command-Line Format | --defaults-extra-file=path |
| Type | String |
| Default Value | [none] |
글로벌 파일들을 읽은 후에 지정한 파일을 읽습니다.
| Property | Value |
|---|---|
| Command-Line Format | --defaults-file=path |
| Type | String |
| Default Value | [none] |
지정한 파일에서만 기본 옵션을 읽습니다.
| Property | Value |
|---|---|
| Command-Line Format | --defaults-group-suffix=string |
| Type | String |
| Default Value | [none] |
concat(group, suffix)로 된 그룹도 함께 읽습니다.
| Property | Value |
|---|---|
| Command-Line Format | --help |
도움말 텍스트를 표시하고 종료합니다.
| Property | Value |
|---|---|
| Command-Line Format | --login-path=path |
| Type | String |
| Default Value | [none] |
로그인 파일에서 지정한 경로를 읽습니다.
| Property | Value |
|---|---|
| Command-Line Format | --no-login-paths |
로그인 패스 파일에서 옵션을 읽는 것을 건너뜁니다.
| Property | Value |
|---|---|
| Command-Line Format | --ndb-connectstring=connection_string |
| Type | String |
| Default Value | [none] |
ndb_mgmd에 연결하기 위한 커넥션 문자열을 설정합니다. Syntax: [nodeid=id;][host=]hostname[:port]. NDB_CONNECTSTRING과 my.cnf에 있는 항목들을 오버라이드합니다.
| Property | Value |
|---|---|
| Command-Line Format | --ndb-mgm-tls=level |
| Type | Enumeration |
| Default Value | relaxed |
| Valid Values | relaxed<br>strict |
매니지먼트 서버에 연결할 때 요구되는 TLS 지원 수준을 설정합니다. relaxed 또는 strict 중 하나입니다. relaxed(기본값)는 TLS 연결을 시도하지만 성공이 필수는 아님을 의미합니다. strict는 연결을 위해 TLS가 필수임을 의미합니다.
| Property | Value |
|---|---|
| Command-Line Format | --ndb-mgmd-host=connection_string |
| Type | String |
| Default Value | [none] |
--ndb-connectstring과 동일합니다.
| Property | Value |
|---|---|
| Command-Line Format | --ndb-nodeid=# |
| Type | Integer |
| Default Value | [none] |
이 노드에 대한 노드 ID를 설정하며, --ndb-connectstring에 의해 설정된 어떤 ID도 오버라이드합니다.
| Property | Value |
|---|---|
| Command-Line Format | --ndb-optimized-node-selection |
트랜잭션에 사용할 노드 선택에 대한 최적화를 활성화합니다. 기본적으로 활성화되어 있으며, 비활성화하려면 --skip-ndb-optimized-node-selection을 사용합니다.
| Property | Value |
|---|---|
| Command-Line Format | --ndb-tls-search-path=list |
| Type | Path name |
| Default Value (Unix) | $HOME/ndb-tls |
| Default Value (Windows) | $HOMEDIR/ndb-tls |
CA 파일을 검색할 디렉터리 목록을 지정합니다. Unix 플랫폼에서 디렉터리 이름들은 콜론(:)으로 구분됩니다. Windows 시스템에서는 세미콜론 문자(;)가 구분자로 사용됩니다. 디렉터리 참조는 상대 또는 절대일 수 있습니다. 하나 이상의 환경 변수를 포함할 수 있으며, 각 환경 변수는 앞에 달러 기호($)가 붙어 표시되고 사용 전에 확장됩니다.
검색은 가장 왼쪽에 있는 디렉터리부터 시작하여 파일이 발견될 때까지 왼쪽에서 오른쪽으로 진행됩니다. 빈 문자열은 빈 검색 경로를 의미하며, 이 경우 모든 검색이 실패합니다. 점 하나(.)로 이루어진 문자열은 검색 경로가 현재 작업 디렉터리로만 제한됨을 나타냅니다.
검색 경로가 제공되지 않으면, 컴파일 시에 설정된 기본값이 사용됩니다. 이 값은 사용하는 플랫폼에 따라 달라집니다. Windows에서는 \ndb-tls이고 다른 플랫폼(Linux 포함)에서는 $HOME/ndb-tls입니다. 이는 -DWITH_NDB_TLS_SEARCH_PATH를 사용하여 NDB Cluster를 컴파일함으로써 오버라이드할 수 있습니다.
| Property | Value |
|---|---|
| Command-Line Format | --no-defaults |
로그인 파일을 제외한 어떤 옵션 파일에서도 기본 옵션을 읽지 않습니다.
| Property | Value |
|---|---|
| Command-Line Format | --print-defaults |
프로그램 인자 목록을 출력하고 종료합니다.
| Property | Value |
|---|---|
| Command-Line Format | --usage |
도움말 텍스트를 표시하고 종료합니다. --help와 동일합니다.
| Property | Value |
|---|---|
| Command-Line Format | --version |
버전 정보를 표시하고 종료합니다.
주의
NDB API를 사용하여 Cluster 테이블 인덱스에서 수행되는 operation은 MySQL에서 보이지 않으며, table을 MySQL server에서 사용할 수 없게 만듭니다. 이 프로그램을 사용하여 index를 삭제한 다음 SQL 노드에서 이 테이블에 접근을 시도하면, 다음과 같이 에러가 발생합니다:
1$> ./ndb_drop_index -c localhost dogs ix -d ctest1 2Dropping index dogs/idx...OK 3 4$> ./mysql -u jon -p ctest1 5Enter password: ******* 6Reading table information for completion of table and column names 7You can turn off this feature to get a quicker startup with -A 8 9Welcome to the MySQL monitor. Commands end with ; or \g. 10Your MySQL connection id is 7 to server version: 5.7.44-ndb-7.5.36 11 12Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 13 14mysql> SHOW TABLES; 15+------------------+ 16| Tables_in_ctest1 | 17+------------------+ 18| a | 19| bt1 | 20| bt2 | 21| dogs | 22| employees | 23| fish | 24+------------------+ 256 rows in set (0.00 sec) 26 27mysql> SELECT * FROM dogs; 28ERROR 1296 (HY000): Got error 4243 'Index not found' from NDBCLUSTER
이러한 경우, table을 다시 MySQL에서 사용할 수 있게 만드는 유일한 방법은 table을 drop하고 다시 생성하는 것입니다. 이를 위해 SQL statement [DROP TABLE](https://dev.mysql.com/doc/refman/9.5/en/drop-table.html "15.1.37 DROP TABLE Statement)이나 ndb_drop_table 유틸리티(자세한 내용은 Section 25.5.11, “ndb_drop_table — Drop an NDB Table”을 참조)를 사용하여 table을 drop할 수 있습니다.
25.5.9 ndb_desc — Describe NDB Tables
25.5.11 ndb_drop_table — Drop an NDB Table