Python:
Go:
Orm:
Application:
Java:
PHP:
Dotnet:
@shenli Any update ?
I will go through the list tomorrow. @ngaut
sqlalchemy unit test:
25 failed, 404 passed, 51 skipped in 34.78 seconds
I will fix the failed cases.
pls add ponyorm for python to the list
Does tidb support sqlalchemy now?
I change my python application from mysql to tidb, it will report the error:
sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1105, 'line 0 column 34 near " (allow_create_user IN (0, 1))" (total length 64)') [SQL: 'ALTER TABLE applications ADD CHECK (allow_create_user IN (0, 1))']
I know tidb doesn't support check constraint, but can let sqlalchemy ORM auto deal with tidb non-support features?
pls add django orm to the list
Hello, please add Eloquent from laravel, it a big player, deserve be on here
@kocoten1992 @lotaku @starplanet @catroot Thanks for your advice! I added them to the list.
please add entity framework core/https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql to the list
@zaaack Done! Thanks!
@shenli Here is the error message from ado.net , maybe support " level read committed; start transaction;" is enough, although I only tried some very simple crud options.
DapperExtensions.Mapper.AutoClassMapper`1[T]
IsGenericTypeDefinition: true
Unhandled Exception: MySql.Data.MySqlClient.MySqlException: line 1 column 25 near " level read committed; start transaction;" (total length 66) ---> MySql.Data.MySqlClient.MySqlException: line 1 column 25 near " level read committed; start transaction;" (total length 66)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.GetResult()
at MySql.Data.MySqlClient.Results.ResultSet.<ReadResultSetHeaderAsync>d__1.MoveNext()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.MySqlDataReader.ActivateResultSet(ResultSet resultSet)
at MySql.Data.MySqlClient.MySqlDataReader.<ReadFirstResultSetAsync>d__65.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MySql.Data.MySqlClient.MySqlDataReader.<CreateAsync>d__64.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MySql.Data.MySqlClient.CommandExecutors.TextCommandExecutor.<ExecuteReaderAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MySql.Data.MySqlClient.CommandExecutors.TextCommandExecutor.<ExecuteNonQueryAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MySql.Data.MySqlClient.MySqlConnection.<BeginDbTransactionAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MySql.Data.MySqlClient.MySqlConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at System.Data.Common.DbConnection.BeginTransaction(IsolationLevel isolationLevel)
at DapperExtensions.Database.BeginTransaction(IsolationLevel isolationLevel)
at ServerCode.Program.testDb() in /home/z/Projects/Strawberry/strawberry-backend/src/Server/Program.fs:line 64
at ServerCode.Program.main(String[] args) in /home/z/Projects/Strawberry/strawberry-backend/src/Server/Program.fs:line 72
@zaaack Thanks!
@zaaack May I have your tidb's version? You can get it by select tidb_version();.
@shenli
$ mysql -h 127.0.0.1 -P 4000 -u root --prompt="tidb> "
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.1-TiDB-0.9.0 MySQL Community Server (Apache License 2.0)
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
tidb> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: 0.9.0
Git Commit Hash: ca048c058297e6826f5eb975d3ff963942cd876a
Git Branch: master
UTC Build Time: 2017-10-05 02:40:50 |
+-----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Should each ORM open their own issue then link to this issue, cause thing gonna get messy real quick
@kocoten1992 Good advice, I just opend a new issue here: https://github.com/pingcap/tidb/issues/4840
2017/12/13 04:55:55.933 session.go:732: [warning] [10] parse error:
line 1 column 60 near "" (total length 60)
ALTER TABLE `content_type` DROP COLUMN `name` CASCADE
2017/12/13 04:55:55.933 conn.go:437: [warning] [10] dispatch error:
id:10, addr:127.0.0.1:36496 status:2, collation:latin1_swedish_ci, user:root
"ALTER TABLE `content_type` DROP COLUMN `name` CASCADE"
line 1 column 60 near "" (total length 60)
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/parser/yy_parser.go:106:
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session.go:733:
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/server/conn.go:757:
2017/12/13 04:55:55.935 server.go:297: [info] [10] close connection
"ALTER TABLE table_name DROP COLUMN column_name CASCADE" isn`t supported yet?
@catroot Yes, we do not support it yet.
@lamxTyler, is there in plans to implement this?
@catroot Currently, we do not have any plan to implement it.
I'm using eloquent, the MySQL JSON format field value cannot query out, the same table and table structure works well on my local machine (MySQL 5.7.20), but it won't work on TiDB:
// TiDBModel < BaseModel < \Illuminate\Database\Eloquent\Model
class TiTransactionPlus extends TiDBModel
{
protected static $table_name = 'transaction_plus';
public $incrementing = false;
protected $primaryKey = 'trans_id';
protected $guarded = [];
protected $casts = [
'trans_metadata' => 'array',
'trans_extra' => 'array',
];
}
The trans_extra should print out as array, but it print out NULL in TiDB. If I change MySQL field format from JSON to varchar/text, it work.
@phoenixg Can you provide us the query SQL or code and your tidb version so that we can reproduce this problem?
@lamxTyler
TiDB version:
Release Version: 1.0.0
Git Commit Hash: 1a175b562bc679694f606c336131a9373064b324
Git Commit Branch: release-1.0
UTC Build Time: 2017-10-19 02:38:02
SQL code:
I use TiTransactionPlus::db()->getQueryLog() to print out SQL executed:
select * from transaction_plus where trans_id = ? limit 1;
It's totally OK in MySQL client(Sequel Pro is OK), so I think it's framework compatibility problem. Here is my composer.json dependency:
"require": {
"php": ">=5.6.0",
"illuminate/database": "~5.2.37",
"illuminate/events": "~5.2.37",
"illuminate/pagination": "~5.2.37",
"doctrine/dbal": "~2.5"
}
@phoenixg Is it correct if we do not cast the trans_extra? Can you give an example of trans_extra?
@lamxTyler Not correct if I don't cast the trans_extra, the value is any JSON data, eg:
{"user":"[email protected]"}
@phoenixg I think maybe there is something wrong when you insert the JSON. Can the SQL generated by framework be inserted into tidb successfully? Can the inserted value be queried out successfully? If not, please provide an example of the SQL.
I've created a small library that extends the Eloquent's MySQL connection class and should improve compatibility with Laravel:
https://packagist.org/packages/evvo/tidb-laravel
Migrations should be working now.
@evvo Cool!
https://github.com/bitnami/bitnami-docker-phabricator/issues/123
It looks like tidb can't be used in phabricator
I am going to close this issue as stale. Compatibility has improved a lot in the last two years, and if there are any specific problems discovered, it is best to create a specific issue.
Most helpful comment
pls add django orm to the list