<p dir="auto">There is <code class="notranslate">check-duplicate-table-enabled</code> in global properties which for single table loading check, I think this is incorrect.</p>
<p dir="auto">The logic table names can not same in same logic database.schema in ShardingSphere.</p>
<p dir="auto">It should <code class="notranslate">THROW EXCEPTION</code> if the same single table name in same database.schema when ShardingSphere startup.</p>
<p dir="auto">This is the basic rule in database system with <code class="notranslate">database.schema.table</code> should be unique. ShardingSphere should not break it.</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">4.0.0-RC</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Logic SQL:</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ALTER TABLE `WG_ORDER`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT` (`CREATE_DT` ASC);"><pre class="notranslate"><span class="pl-k">ALTER</span> <span class="pl-k">TABLE</span> <span class="pl-s"><span class="pl-pds">`</span>WG_ORDER<span class="pl-pds">`</span></span>
DROP COLUMN <span class="pl-s"><span class="pl-pds">`</span>COMMIT_ID<span class="pl-pds">`</span></span>,
ADD INDEX <span class="pl-s"><span class="pl-pds">`</span>IDX_CREATE_DT<span class="pl-pds">`</span></span> (<span class="pl-s"><span class="pl-pds">`</span>CREATE_DT<span class="pl-pds">`</span></span> <span class="pl-k">ASC</span>);</pre></div>
<p dir="auto">i want (1) or (2)</p>
<p dir="auto">=(1)= remove <code class="notranslate">`</code></p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ADD INDEX IDX_CREATE_DT_WG_ORDER_1 (`CREATE_DT` ASC);"><pre class="notranslate">ADD INDEX IDX_CREATE_DT_WG_ORDER_1 (<span class="pl-s"><span class="pl-pds">`</span>CREATE_DT<span class="pl-pds">`</span></span> <span class="pl-k">ASC</span>);</pre></div>
<p dir="auto">=(2)= without ds postfix as the orginal sql</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ADD INDEX `IDX_CREATE_DT` (`CREATE_DT` ASC);"><pre class="notranslate">ADD INDEX <span class="pl-s"><span class="pl-pds">`</span>IDX_CREATE_DT<span class="pl-pds">`</span></span> (<span class="pl-s"><span class="pl-pds">`</span>CREATE_DT<span class="pl-pds">`</span></span> <span class="pl-k">ASC</span>);</pre></div>
<h3 dir="auto">Actual behavior</h3>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ADD INDEX `IDX_CREATE_DT`_WG_ORDER_1 (`CREATE_DT` ASC);"><pre class="notranslate">ADD INDEX <span class="pl-s"><span class="pl-pds">`</span>IDX_CREATE_DT<span class="pl-pds">`</span></span>_WG_ORDER_1 (<span class="pl-s"><span class="pl-pds">`</span>CREATE_DT<span class="pl-pds">`</span></span> <span class="pl-k">ASC</span>);</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.sql.SQLSyntaxErrorException: 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 '_WG_ORDER_0 (`CREATE_DT` ASC)' at line 3

	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)"><pre class="notranslate"><code class="notranslate">java.sql.SQLSyntaxErrorException: 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 '_WG_ORDER_0 (`CREATE_DT` ASC)' at line 3

	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
</code></pre></div>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    @Test
    fun alterTable() {
        val statement = datasource.connection.prepareStatement(&quot;&quot;&quot;
            ALTER TABLE `WG_ORDER`
            DROP COLUMN `COMMIT_ID`,
            ADD INDEX `IDX_CREATE_DT` (`CREATE_DT` ASC);
        &quot;&quot;&quot;.trimIndent())

        val result = statement.executeUpdate()"><pre class="notranslate">    @Test
    <span class="pl-k">fun</span> <span class="pl-en">alterTable</span>() {
        <span class="pl-k">val</span> statement <span class="pl-k">=</span> datasource.connection.prepareStatement(<span class="pl-s"><span class="pl-pds">"""</span></span>
<span class="pl-s">            ALTER TABLE `WG_ORDER`</span>
<span class="pl-s">            DROP COLUMN `COMMIT_ID`,</span>
<span class="pl-s">            ADD INDEX `IDX_CREATE_DT` (`CREATE_DT` ASC);</span>
<span class="pl-s">        <span class="pl-pds">"""</span></span>.trimIndent())

        <span class="pl-k">val</span> result <span class="pl-k">=</span> statement.executeUpdate()</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-05-23 19:22:42.466  INFO 6868 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2019-05-23 19:22:42.466  INFO 6868 --- [           main] ShardingSphere-SQL                       : Logic SQL: ALTER TABLE `WG_ORDER`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT` (`CREATE_DT` ASC);
2019-05-23 19:22:42.467  INFO 6868 --- [           main] ShardingSphere-SQL                       : SQLStatement: AbstractSQLStatement(type=DDL, tables=Tables(tables=[Table(name=WG_ORDER, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=WG_ORDER, quoteCharacter=BACK_QUOTE, schemaNameLength=0), IndexToken(stopIndex=72, tableName=WG_ORDER)], parametersIndex=0, logicSQL=ALTER TABLE `WG_ORDER`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT` (`CREATE_DT` ASC);)
2019-05-23 19:22:42.468  INFO 6868 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds0 ::: ALTER TABLE `WG_ORDER_0`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT`_WG_ORDER_0 (`CREATE_DT` ASC);
2019-05-23 19:22:42.468  INFO 6868 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds0 ::: ALTER TABLE `WG_ORDER_1`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT`_WG_ORDER_1 (`CREATE_DT` ASC);
2019-05-23 19:22:42.468  INFO 6868 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: ALTER TABLE `WG_ORDER_0`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT`_WG_ORDER_0 (`CREATE_DT` ASC);
2019-05-23 19:22:42.469  INFO 6868 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: ALTER TABLE `WG_ORDER_1`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT`_WG_ORDER_1 (`CREATE_DT` ASC);"><pre class="notranslate"><code class="notranslate">2019-05-23 19:22:42.466  INFO 6868 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2019-05-23 19:22:42.466  INFO 6868 --- [           main] ShardingSphere-SQL                       : Logic SQL: ALTER TABLE `WG_ORDER`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT` (`CREATE_DT` ASC);
2019-05-23 19:22:42.467  INFO 6868 --- [           main] ShardingSphere-SQL                       : SQLStatement: AbstractSQLStatement(type=DDL, tables=Tables(tables=[Table(name=WG_ORDER, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=WG_ORDER, quoteCharacter=BACK_QUOTE, schemaNameLength=0), IndexToken(stopIndex=72, tableName=WG_ORDER)], parametersIndex=0, logicSQL=ALTER TABLE `WG_ORDER`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT` (`CREATE_DT` ASC);)
2019-05-23 19:22:42.468  INFO 6868 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds0 ::: ALTER TABLE `WG_ORDER_0`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT`_WG_ORDER_0 (`CREATE_DT` ASC);
2019-05-23 19:22:42.468  INFO 6868 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds0 ::: ALTER TABLE `WG_ORDER_1`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT`_WG_ORDER_1 (`CREATE_DT` ASC);
2019-05-23 19:22:42.468  INFO 6868 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: ALTER TABLE `WG_ORDER_0`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT`_WG_ORDER_0 (`CREATE_DT` ASC);
2019-05-23 19:22:42.469  INFO 6868 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: ALTER TABLE `WG_ORDER_1`
DROP COLUMN `COMMIT_ID`,
ADD INDEX `IDX_CREATE_DT`_WG_ORDER_1 (`CREATE_DT` ASC);
</code></pre></div>