You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/11/29 03:21:45 UTC

[GitHub] [shardingsphere] axzxs2001 opened a new issue #13840: .net core connection shardingsphere error

axzxs2001 opened a new issue #13840:
URL: https://github.com/apache/shardingsphere/issues/13840


   ## Bug Report
   An error occurred while connecting to shardingsphere  database 。
   
   **1、Version**
   sharadingsphere 5.0.0
   .NET 6.0
   
   **2、code**
   ```
   using MySql.Data.MySqlClient;
   
   var constrbuilder = new MySqlConnectionStringBuilder()
   {
       UserID = "root",
       Password = "root",
       Server = "127.0.0.1",
       Port = 3307,
       Database = "sharding_db",
       ConnectionProtocol = MySqlConnectionProtocol.Tcp,
   };
   
   Console.WriteLine(constrbuilder.ConnectionString);
   
   using var con = new MySqlConnection(constrbuilder.ConnectionString);
   con.Open();
   using var cmd = new MySqlCommand("select * from accounting", con);
   using var dr = cmd.ExecuteReader();
   while (dr.Read())
   {
       Console.WriteLine(dr.GetValue(0));
   }
   ```
   
   **2、Excetipon**
   MySql.Data.MySqlClient.MySqlException:“This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'”


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #13840: .net core connection shardingsphere error

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #13840:
URL: https://github.com/apache/shardingsphere/issues/13840#issuecomment-981329124


   Hi @axzxs2001 ,
   Since we don't know what SQL statement is sent when .net connects to the Proxy, this reason is not easy to analyze.
   Please change the log level to debug, restart the Proxy and test it, then record the SQL statement received by the Proxy when the error is reported.
   
   The log level is configured in `logback.xml`, set
     `<logger name="org.apache.shardingsphere" level="info" additivity="false">`
   To
     `<logger name="org.apache.shardingsphere" level="debug" additivity="false">`
   That's it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuichenchuxin commented on issue #13840: .net core connection shardingsphere error

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #13840:
URL: https://github.com/apache/shardingsphere/issues/13840#issuecomment-981436836


   @RaigorJiang @axzxs2001 It's not supported yet, I'll fix it soon.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] axzxs2001 commented on issue #13840: .net core connection shardingsphere error

Posted by GitBox <gi...@apache.org>.
axzxs2001 commented on issue #13840:
URL: https://github.com/apache/shardingsphere/issues/13840#issuecomment-981407061


   SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP())  
   
   UTC_TIMESTAMP() doesn't yet support,but mysql  is support


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] axzxs2001 commented on issue #13840: .net core connection shardingsphere error

Posted by GitBox <gi...@apache.org>.
axzxs2001 commented on issue #13840:
URL: https://github.com/apache/shardingsphere/issues/13840#issuecomment-981395462


   Starting the ShardingSphere-Proxy ...
   Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
   WARNING: An illegal reflective access operation has occurred
   WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/MyFile/tools/apache-shardingsphere-5.0.0-shardingsphere-proxy-bin/lib/groovy-2.4.19-indy.jar) to method java.lang.Object.finalize()
   WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
   WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
   WARNING: All illegal access operations will be denied in a future release
   Thanks for using Atomikos! Evaluate http://www.atomikos.com/Main/ExtremeTransactions for advanced features and professional support
   or register at http://www.atomikos.com/Main/RegisterYourDownload to disable this message and receive FREE tips & advice
   [INFO ] 2021-11-29 17:28:10.164 [main] o.a.s.p.i.BootstrapInitializer - Database name is `MySQL`, version is `8.0.21`
   [INFO ] 2021-11-29 17:28:10.771 [main] o.a.s.p.frontend.ShardingSphereProxy - ShardingSphere-Proxy start success
   [DEBUG] 2021-11-29 17:28:13.265 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 65 00 00 00 0a 38 2e 30 2e 32 31 2d 53 68 61 72 |e....8.0.21-Shar|
   |00000010| 64 69 6e 67 53 70 68 65 72 65 2d 50 72 6f 78 79 |dingSphere-Proxy|
   |00000020| 20 35 2e 30 2e 30 00 01 00 00 00 30 6d 57 36 51 | 5.0.0.....0mW6Q|
   |00000030| 37 46 45 00 4f b7 2d 02 00 08 00 15 00 00 00 00 |7FE.O.-.........|
   |00000040| 00 00 00 00 00 00 64 48 70 42 44 51 38 6a 73 62 |......dHpBDQ8jsb|
   |00000050| 4b 4b 00 6d 79 73 71 6c 5f 6e 61 74 69 76 65 5f |KK.mysql_native_|
   |00000060| 70 61 73 73 77 6f 72 64 00                      |password.       |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.292 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Read from client 4a79290d :
            +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 5c 00 00 01 0f a2 8b 00 ff ff ff 00 21 00 00 00 |\...........!...|
   |00000010| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
   |00000020| 00 00 00 00 72 6f 6f 74 00 14 33 e9 01 d0 2a d9 |....root..3...*.|
   |00000030| 0a 06 76 a6 87 76 ee b4 be bd 79 19 27 ca 73 68 |..v..v....y.'.sh|
   |00000040| 61 72 64 69 6e 67 5f 64 62 00 6d 79 73 71 6c 5f |arding_db.mysql_|
   |00000050| 6e 61 74 69 76 65 5f 70 61 73 73 77 6f 72 64 00 |native_password.|
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.304 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 07 00 00 02 00 00 00 02 00 00 00                |...........     |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.331 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Read from client 4a79290d :
            +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 98 00 00 00 03 53 45 4c 45 43 54 20 40 40 6d 61 |.....SELECT @@ma|
   |00000010| 78 5f 61 6c 6c 6f 77 65 64 5f 70 61 63 6b 65 74 |x_allowed_packet|
   |00000020| 2c 20 40 40 63 68 61 72 61 63 74 65 72 5f 73 65 |, @@character_se|
   |00000030| 74 5f 63 6c 69 65 6e 74 2c 20 0a 20 20 20 20 20 |t_client, .     |
   |00000040| 20 20 20 40 40 63 68 61 72 61 63 74 65 72 5f 73 |   @@character_s|
   |00000050| 65 74 5f 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 40 |et_connection, @|
   |00000060| 40 6c 69 63 65 6e 73 65 2c 20 40 40 73 71 6c 5f |@license, @@sql_|
   |00000070| 6d 6f 64 65 2c 20 40 40 6c 6f 77 65 72 5f 63 61 |mode, @@lower_ca|
   |00000080| 73 65 5f 74 61 62 6c 65 5f 6e 61 6d 65 73 2c 20 |se_table_names, |
   |00000090| 40 40 61 75 74 6f 63 6f 6d 6d 69 74             |@@autocommit    |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.339 [Connection-1-ThreadExecutor] o.a.s.p.f.m.c.MySQLCommandExecutorFactory - Execute packet type: COM_QUERY, value: MySQLComQueryPacket(sql=SELECT @@max_allowed_packet, @@character_set_client,
           @@character_set_connection, @@license, @@sql_mode, @@lower_case_table_names, @@autocommit)
   [DEBUG] 2021-11-29 17:28:13.968 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 01 00 00 01 07                                  |.....           |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.970 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 49 00 00 02 03 64 65 66 0b 73 68 61 72 64 69 6e |I....def.shardin|
   |00000010| 67 5f 64 62 00 00 14 40 40 6d 61 78 5f 61 6c 6c |g_db...@@max_all|
   |00000020| 6f 77 65 64 5f 70 61 63 6b 65 74 14 40 40 6d 61 |owed_packet.@@ma|
   |00000030| 78 5f 61 6c 6c 6f 77 65 64 5f 70 61 63 6b 65 74 |x_allowed_packet|
   |00000040| 0c 21 00 15 00 00 00 08 20 00 00 00 00          |.!...... ....   |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.971 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 4d 00 00 03 03 64 65 66 0b 73 68 61 72 64 69 6e |M....def.shardin|
   |00000010| 67 5f 64 62 00 00 16 40 40 63 68 61 72 61 63 74 |g_db...@@charact|
   |00000020| 65 72 5f 73 65 74 5f 63 6c 69 65 6e 74 16 40 40 |er_set_client.@@|
   |00000030| 63 68 61 72 61 63 74 65 72 5f 73 65 74 5f 63 6c |character_set_cl|
   |00000040| 69 65 6e 74 0c 21 00 07 00 00 00 fd 20 00 00 00 |ient.!...... ...|
   |00000050| 00                                              |.               |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.976 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 55 00 00 04 03 64 65 66 0b 73 68 61 72 64 69 6e |U....def.shardin|
   |00000010| 67 5f 64 62 00 00 1a 40 40 63 68 61 72 61 63 74 |g_db...@@charact|
   |00000020| 65 72 5f 73 65 74 5f 63 6f 6e 6e 65 63 74 69 6f |er_set_connectio|
   |00000030| 6e 1a 40 40 63 68 61 72 61 63 74 65 72 5f 73 65 |n.@@character_se|
   |00000040| 74 5f 63 6f 6e 6e 65 63 74 69 6f 6e 0c 21 00 07 |t_connection.!..|
   |00000050| 00 00 00 fd 20 00 00 00 00                      |.... ....       |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.984 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 33 00 00 05 03 64 65 66 0b 73 68 61 72 64 69 6e |3....def.shardin|
   |00000010| 67 5f 64 62 00 00 09 40 40 6c 69 63 65 6e 73 65 |g_db...@@license|
   |00000020| 09 40 40 6c 69 63 65 6e 73 65 0c 21 00 03 00 00 |.@@license.!....|
   |00000030| 00 fd 20 00 00 00 00                            |.. ....         |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.994 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 35 00 00 06 03 64 65 66 0b 73 68 61 72 64 69 6e |5....def.shardin|
   |00000010| 67 5f 64 62 00 00 0a 40 40 73 71 6c 5f 6d 6f 64 |g_db...@@sql_mod|
   |00000020| 65 0a 40 40 73 71 6c 5f 6d 6f 64 65 0c 21 00 2a |e.@@sql_mode.!.*|
   |00000030| 00 00 00 fd 20 00 00 00 00                      |.... ....       |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.994 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 51 00 00 07 03 64 65 66 0b 73 68 61 72 64 69 6e |Q....def.shardin|
   |00000010| 67 5f 64 62 00 00 18 40 40 6c 6f 77 65 72 5f 63 |g_db...@@lower_c|
   |00000020| 61 73 65 5f 74 61 62 6c 65 5f 6e 61 6d 65 73 18 |ase_table_names.|
   |00000030| 40 40 6c 6f 77 65 72 5f 63 61 73 65 5f 74 61 62 |@@lower_case_tab|
   |00000040| 6c 65 5f 6e 61 6d 65 73 0c 21 00 15 00 00 00 08 |le_names.!......|
   |00000050| 20 00 00 00 00                                  | ....           |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.995 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 39 00 00 08 03 64 65 66 0b 73 68 61 72 64 69 6e |9....def.shardin|
   |00000010| 67 5f 64 62 00 00 0c 40 40 61 75 74 6f 63 6f 6d |g_db...@@autocom|
   |00000020| 6d 69 74 0c 40 40 61 75 74 6f 63 6f 6d 6d 69 74 |mit.@@autocommit|
   |00000030| 0c 21 00 01 00 00 00 08 00 00 00 00 00          |.!...........   |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.996 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 05 00 00 09 fe 00 00 02 00                      |.........       |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:13.996 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 4b 00 00 0a 07 34 31 39 34 33 30 34 07 75 74 66 |K....4194304.utf|
   |00000010| 38 6d 62 34 07 75 74 66 38 6d 62 34 03 47 50 4c |8mb4.utf8mb4.GPL|
   |00000020| 2a 53 54 52 49 43 54 5f 54 52 41 4e 53 5f 54 41 |*STRICT_TRANS_TA|
   |00000030| 42 4c 45 53 2c 4e 4f 5f 45 4e 47 49 4e 45 5f 53 |BLES,NO_ENGINE_S|
   |00000040| 55 42 53 54 49 54 55 54 49 4f 4e 01 31 01 31    |UBSTITUTION.1.1 |
   +--------+-------------------------------------------------+----------------+
            +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 05 00 00 0b fe 00 00 02 00                      |.........       |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:14.033 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Read from client 4a79290d :
            +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 28 00 00 00 03 53 45 4c 45 43 54 20 54 49 4d 45 |(....SELECT TIME|
   |00000010| 44 49 46 46 28 4e 4f 57 28 29 2c 20 55 54 43 5f |DIFF(NOW(), UTC_|
   |00000020| 54 49 4d 45 53 54 41 4d 50 28 29 29             |TIMESTAMP())    |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-11-29 17:28:14.048 [Connection-1-ThreadExecutor] o.a.s.p.f.m.c.MySQLCommandExecutorFactory - Execute packet type: COM_QUERY, value: MySQLComQueryPacket(sql=SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP()))
   
   [DEBUG] 2021-11-29 17:28:14.177 [nioEventLoopGroup-3-1] o.a.s.db.protocol.codec.PacketCodec - Write to client 4a79290d :         +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 72 00 00 01 ff d3 04 23 34 32 30 30 30 54 68 69 |r......#42000Thi|
   |00000010| 73 20 76 65 72 73 69 6f 6e 20 6f 66 20 53 68 61 |s version of Sha|
   |00000020| 72 64 69 6e 67 53 70 68 65 72 65 2d 50 72 6f 78 |rdingSphere-Prox|
   |00000030| 79 20 64 6f 65 73 6e 27 74 20 79 65 74 20 73 75 |y doesn't yet su|
   |00000040| 70 70 6f 72 74 20 74 68 69 73 20 53 51 4c 2e 20 |pport this SQL. |
   |00000050| 27 59 6f 75 20 68 61 76 65 20 61 6e 20 65 72 72 |'You have an err|
   |00000060| 6f 72 20 69 6e 20 79 6f 75 72 20 53 51 4c 20 73 |or in your SQL s|
   |00000070| 79 6e 74 61 78 27                               |yntax'          |
   +--------+-------------------------------------------------+----------------+
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu closed issue #13840: .net core connection shardingsphere error

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #13840:
URL: https://github.com/apache/shardingsphere/issues/13840


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #13840: .net core connection shardingsphere error

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #13840:
URL: https://github.com/apache/shardingsphere/issues/13840#issuecomment-981426859


   Thank you for your feedback. 
   These are special functions. ShardingSphere needs to parse and determine how to route to the data source.
   @tuichenchuxin  Can you take a look?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #13840: .net core connection shardingsphere error

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #13840:
URL: https://github.com/apache/shardingsphere/issues/13840#issuecomment-981443197


   Thank you @tuichenchuxin .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org