Repository: apache/shardingsphere
Issue: If there is quoteCharacter for index name, sql can not be executed

## Bug Report

**For English only**, other languages will not accept.

Before report a bug, make sure you have:

- Searched open and closed [GitHub issues](https://github.com/sharding-sphere/sharding-sphere/issues).
- Read documentation: [ShardingSphere Doc](http://shardingsphere.io/document/current/en/overview/).

Please pay attention on issues you submitted, because we maybe need more details. 
If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**.

Please answer these questions before submitting your issue. Thanks!

### Which version of ShardingSphere did you use?
4.0.0-RC1
### Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-Proxy
### Expected behavior
The following SQL can be executed correctly.
```
CREATE TABLE `t_order` (   `order_id` varchar(100) NOT NULL,   `user_id` varchar(100) DEFAULT NULL,   `status` varchar(45) DEFAULT NULL,   PRIMARY KEY (`order_id`),   KEY `order_index_t_order` (`order_id`) )  DEFAULT CHARSET=utf8;
```
### Actual behavior
An exception is thrown.
```
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '_t_order_0 (`order_id`) )  DEFAULT CHARSET=utf8' at line 1
```
### Reason analyze (If you can)
The rewritten SQL is not correct：

> CREATE TABLE `t_order_0` (   `order_id` varchar(100) NOT NULL,   `user_id` varchar(100) DEFAULT NULL,   `status` varchar(45) DEFAULT NULL,   PRIMARY KEY (`order_id`),   KEY \\`order_index_t_order\\`_t_order_0 (\\`order_id\\`) )  DEFAULT CHARSET=utf8

The related code is:
In SQLRewriteEngine class:
```
private void appendIndexPlaceholder(final SQLBuilder sqlBuilder, final IndexToken indexToken, final int count) {
        String indexName = originalSQL.substring(indexToken.getStartIndex(), indexToken.getStopIndex() + 1);
        String logicTableName = indexToken.getTableName().toLowerCase();
        if (Strings.isNullOrEmpty(logicTableName)) {
            logicTableName = shardingRule.getLogicTableName(indexName);
        }
        sqlBuilder.appendPlaceholder(new IndexPlaceholder(indexName, logicTableName));
        appendRest(sqlBuilder, count, indexToken.getStopIndex() + 1);
    }
```

### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

### Example codes for reproduce this issue (such as a github link).


Changed files:
sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/IndexPlaceholder.java
sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java

diff --git a/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java b/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java
index c7fd883b2cd..468b450962a 100644
--- a/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java
+++ b/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java
@@ -174,17 +174,11 @@ public final class SQLBuilder {
     }
     
     private void appendIndexPlaceholder(final IndexPlaceholder placeholder, final String actualTableName, final StringBuilder stringBuilder) {
-        stringBuilder.append(placeholder.getLogicIndexName());
-        if (!Strings.isNullOrEmpty(actualTableName)) {
-            if ('`' == stringBuilder.charAt(stringBuilder.length() - 1)) { 
-                stringBuilder.deleteCharAt(stringBuilder.length() - 1);
-                stringBuilder.append("_");
-                stringBuilder.append(actualTableName);
-                stringBuilder.append("`"); 
-            } else { 
-                stringBuilder.append("_");
-                stringBuilder.append(actualTableName); 
-            }
+        if (Strings.isNullOrEmpty(actualTableName)) {
+            stringBuilder.append(placeholder.getQuoteCharacter().getStartDelimiter()).append(placeholder.getLogicIndexName()).append(placeholder.getQuoteCharacter().getEndDelimiter());
+        } else {
+            stringBuilder.append(placeholder.getQuoteCharacter().getStartDelimiter())
+                    .append(placeholder.getLogicIndexName()).append("_").append(actualTableName).append(placeholder.getQuoteCharacter().getEndDelimiter());
         }
     }
     
diff --git a/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/IndexPlaceholder.java b/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/IndexPlaceholder.java
index b6a1b831f57..cb29ab440e5 100644
--- a/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/IndexPlaceholder.java
+++ b/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/placeholder/IndexPlaceholder.java
@@ -18,14 +18,15 @@
 package org.apache.shardingsphere.core.rewrite.placeholder;
 
 import lombok.Getter;
-import lombok.RequiredArgsConstructor;
+import org.apache.shardingsphere.core.parse.antlr.constant.QuoteCharacter;
+import org.apache.shardingsphere.core.parse.util.SQLUtil;
 
 /**
  * Index placeholder for rewrite.
  *
  * @author zhangliang
+ * @author panjuan
  */
-@RequiredArgsConstructor
 @Getter
 public final class IndexPlaceholder implements ShardingPlaceholder {
     
@@ -33,6 +34,14 @@ public final class IndexPlaceholder implements ShardingPlaceholder {
     
     private final String logicTableName;
     
+    private final QuoteCharacter quoteCharacter;
+    
+    public IndexPlaceholder(final String logicIndexLiteral, final String logicTableName) {
+        logicIndexName = SQLUtil.getExactlyValue(logicIndexLiteral);
+        this.logicTableName = logicTableName;
+        quoteCharacter = QuoteCharacter.getQuoteCharacter(logicIndexLiteral);
+    }
+    
     @Override
     public String toString() {
         return logicIndexName;