New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typeorm: add support for information schema query coming from framework #9214
Comments
I could not immediately reproduce this. Obviously the panic isn't correct; but I suspect there's something lower-level going on. Do we know what is causing all the vttablet errors like:
? Getting a general log from MySQL might be useful. |
I'm trying to activate the general logs, but I can't find a way to do it. Like I said, I'm running this in a cluster using the operator from planetscale. I've passed the following as an extra arg: --mycnf_general_log_path=/vt/vtdataroot/general_log.log This was the only one found in this documentation. But it doesn't show up in I've also tried activating the general logs at run time, using the following queries: SET global general_log = ON;
SET global log_output = 'file';
SET global general_log_file='/vt/vtdataroot/vt_1009888160/general_log.log'; But the variables do not change, the Do you know a way to activate those logs? |
@aquarapid These are the params set to the vttablet:
And this is the [mysqld]
# Global configuration that is auto-included for all MySQL/MariaDB versions
datadir = /vt/vtdataroot/vt_1009888160/data
innodb_data_home_dir = /vt/vtdataroot/vt_1009888160/innodb/data
innodb_log_group_home_dir = /vt/vtdataroot/vt_1009888160/innodb/logs
log-error = /vt/vtdataroot/vt_1009888160/error.log
log-bin = /vt/vtdataroot/vt_1009888160/bin-logs/vt-1009888160-bin
relay-log = /vt/vtdataroot/vt_1009888160/relay-logs/vt-1009888160-relay-bin
relay-log-index = /vt/vtdataroot/vt_1009888160/relay-logs/vt-1009888160-relay-bin.index
pid-file = /vt/vtdataroot/vt_1009888160/mysql.pid
port = 3306
secure-file-priv = /vt/vtdataroot/vt_1009888160/tmp
# all db instances should start in read-only mode - once the db is started and
# fully functional, we'll push it into read-write mode
read-only
server-id = 1143090177
# all db instances should skip starting replication threads - that way we can do any
# additional configuration (like enabling semi-sync) before we connect to
# the source.
skip_slave_start
socket = /vt/socket/mysql.sock
tmpdir = /vt/vtdataroot/vt_1009888160/tmp
slow-query-log-file = /vt/vtdataroot/vt_1009888160/slow-query.log
# These are sensible defaults that apply to all MySQL/MariaDB versions
long_query_time = 2
slow-query-log
skip-name-resolve
connect_timeout = 30
innodb_lock_wait_timeout = 20
max_allowed_packet = 64M
max_connections = 500
# This file is auto-included when MySQL 5.7 is detected.
# MySQL 5.7 does not enable the binary log by default, and
# info repositories default to file
gtid_mode = ON
log_slave_updates
enforce_gtid_consistency
expire_logs_days = 3
master_info_repository = TABLE
relay_log_info_repository = TABLE
relay_log_purge = 1
relay_log_recovery = 1
# In MySQL 5.7 the default charset is latin1
character_set_server = utf8
collation_server = utf8_general_ci
# Semi-sync replication is required for automated unplanned failover
# (when the primary goes away). Here we just load the plugin so it's
# available if desired, but it's disabled at startup.
#
# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync
# at the proper time when replication is set up, or when a primary is
# promoted or demoted.
plugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so
# When semi-sync is enabled, don't allow fallback to async
# if you get no ack, or have no replicas. This is necessary to
# prevent alternate futures when doing a failover in response to
# a primary that becomes unresponsive.
rpl_semi_sync_master_timeout = 1000000000000000000
rpl_semi_sync_master_wait_no_slave = 1
## /vt/config/mycnf/rbr.cnf
binlog_format=row
## /vt/config/mycnf/log-error.cnf
log-error = /vt/config/stderr.symlink
## /vt/config/mycnf/socket.cnf
socket = /vt/socket/mysql.sock
|
I think those are generated by the logged query. The query is right below that error. It can also be found in the start_logs.log file. Which contains all queries sent to the vtgate. |
With Gen4 or Gen4Fallback you should not see issue with inforamtion_schema query. |
@harshit-gangal I was using the latest version(the main branch), 3 days ago. Which contained that, if it was integrated 5 days ago. Should I pass something to vitess to activate that? Is that an option? |
To be sure, share the commit SHA, one of the place to find is on VTGate UI, or run |
Your MySQL connection id is 7
Server version: 5.7.9-vitess-13.0.0-SNAPSHOT Version: 13.0.0-SNAPSHOT (Git revision 77b980630c branch 'main') built on Fri Nov 12 15:50:52 UTC 2021 by vitess@buildkitsandbox using go1.17 linux/amd64
MySQL [(none)]> show variables like '%version%'
-> ;
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name | Value |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| innodb_version | 5.7.31 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1,TLSv1.2 |
| version | 5.7.9-vitess-13.0.0-SNAPSHOT |
| version_comment | Version: 13.0.0-SNAPSHOT (Git revision 77b980630c branch 'main') built on Fri Nov 12 15:50:52 UTC 2021 by vitess@buildkitsandbox using go1.17 linux/amd64 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
But, shouldn't it be activated with a param first? |
also can you post |
MySQL [(none)]> explain format=vitess select * from company;
+----------+-----------------+------------+-------------+------------+-----------------------+
| operator | variant | keyspace | destination | tabletType | query |
+----------+-----------------+------------+-------------+------------+-----------------------+
| Route | SelectUnsharded | ionescu | | UNKNOWN | select * from company |
+----------+-----------------+------------+-------------+------------+-----------------------+
1 row in set (0.050 sec) |
For the failing query :) |
have you set |
explain format=vitess SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'company_invite_code'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_role'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'item'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item_urgent'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item_event'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'company'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'user_company'
UNION
SELECT
`TABLE_SCHEMA`,
`TABLE_NAME`
FROM
`INFORMATION_SCHEMA`.`TABLES`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'user'; +------------------------------------------------------------------------------------+-----------+------------+-------------+------------+-----------------------------------------------------
--------------------------------------------------------------------------------+
| operator | variant | keyspace | destination | tabletType | query
|
+------------------------------------------------------------------------------------+-----------+------------+-------------+------------+-----------------------------------------------------
--------------------------------------------------------------------------------+
| Distinct | | | | UNKNOWN |
|
| └─ Concatenate | | | | UNKNOWN |
|
| ├─ Distinct | | | | UNKNOWN |
|
| │ └─ Concatenate | | | | UNKNOWN |
|
| │ ├─ Distinct | | | | UNKNOWN |
|
| │ │ └─ Concatenate | | | | UNKNOWN |
|
| │ │ ├─ Distinct | | | | UNKNOWN | |
| │ │ │ └─ Concatenate | | | | UNKNOWN | |
| │ │ │ ├─ Distinct | | | | UNKNOWN | |
| │ │ │ │ └─ Concatenate | | | | UNKNOWN | |
| │ │ │ │ ├─ Distinct | | | | UNKNOWN | |
| │ │ │ │ │ └─ Concatenate | | | | UNKNOWN | |
| │ │ │ │ │ ├─ Distinct | | | | UNKNOWN | |
| │ │ │ │ │ │ └─ Concatenate | | | | UNKNOWN | |
| │ │ │ │ │ │ ├─ Distinct | | | | UNKNOWN | |
| │ │ │ │ │ │ │ └─ Concatenate | | | | UNKNOWN | |
| │ │ │ │ │ │ │ ├─ Distinct | | | | UNKNOWN | |
| │ │ │ │ │ │ │ │ └─ Concatenate | | | | UNKNOWN | |
| │ │ │ │ │ │ │ │ ├─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME |
| │ │ │ │ │ │ │ │ └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME1 |
| │ │ │ │ │ │ │ └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME2 |
| │ │ │ │ │ │ └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME3 |
| │ │ │ │ │ └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME4 |
| │ │ │ │ └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME5 |
| │ │ │ └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME6 |
| │ │ └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME7 |
| │ └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME8 |
| └─ Route | SelectDBA | ionescu | | UNKNOWN | select TABLE_SCHEMA, TABLE_NAME from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = :__vtschemaname and TABLE_NAME = :TABLE_NAME9 |
+------------------------------------------------------------------------------------+-----------+------------+-------------+------------+-------------------------------------------------------------------------------------------------------------------------------------+
28 rows in set (0.052 sec) |
@harshit-gangal no, I haven't. That's why I was asking above. I searched in the vtgate flags, and I couldn't find that flag: https://vitess.io/docs/reference/programs/vtgate/ |
we will update the docs, kindly set it to |
does that solve for you? |
Last night it was late and I postponed it for today. I've added the flag to the vtgate only, and retried. But now I receive another error: E1116 08:01:43.506683 1 vtgate.go:542] Execute: symbol CONSTRAINT_NAME not found in table or subquery, request: map[BindVariables:map[vtg1:type:VARBINARY value:"ionescu" vtg10:type:VARBINARY value:"user_company" vtg11:type:VARBINARY value:"user" vtg12:type:VARBINARY value:"PRIMARY" vtg2:type:VARBINARY value:"company_invite_code" vtg3:type:VARBINARY value:"site_role" vtg4:type:VARBINARY value:"item" vtg5:type:VARBINARY value:"site_item_urgent" vtg6:type:VARBINARY value:"site_item_event" vtg7:type:VARBINARY value:"site_item" vtg8:type:VARBINARY value:"site" vtg9:type:VARBINARY value:"company"] Session:in_transaction:true shard_sessions:{target:{keyspace:"ionescu" shard:"-" tablet_type:PRIMARY} transaction_id:1636990091136287261 tablet_alias:{cell:"decontabodusseldorf" uid:1009888160}} autocommit:true target_string:"ionescu" options:{included_fields:ALL client_found_rows:true workload:OLTP} found_rows:59 row_count:-1 DDLStrategy:"direct" SessionUUID:"6fb7225b-46b3-11ec-87f8-2afd29d0a3f4" enable_system_settings:true Sql:
SELECT * FROM (
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'company_invite_code'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site_role'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site_item_urgent'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site_item_event'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site_item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'user_company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'user'
) `kcu` WHERE `CONSTRAINT_NAME` = 'PRIMARY']
E1116 08:01:48.508423 1 throttled.go:77] Execute: skipped 2 log messages The args passed to the vtgate: Command:
/vt/bin/vtgate
Args:
--buffer_max_failover_duration=10s
--buffer_min_time_between_failovers=20s
--buffer_size=1000
--cell=decontabodusseldorf
--cells_to_watch=decontabodusseldorf
--enable_buffer=true
--grpc_max_message_size=67108864
--grpc_port=15999
--logtostderr=true
--mysql_auth_server_impl=static
--mysql_auth_server_static_file=/vt/secrets/vtgate-static-auth/users.json
--mysql_auth_static_reload_interval=30s
--mysql_server_port=3306
--planner_version=Gen4Fallback
--port=15000
--service_map=grpc-vtgateservice
--tablet_types_to_wait=MASTER,REPLICA
--topo_global_root=/vitess/vt/global
--topo_global_server_address=vt-etcd-ec571fc7-client.default.svc:2379
--topo_implementation=etcd2 If I run it with |
THese are the logs when the vtgate starts: ERROR: logging before flag.Parse: E1116 07:57:12.232758 1 syslogger.go:149] can't connect to syslog
I1116 07:57:12.400618 1 servenv.go:97] Version: 13.0.0-SNAPSHOT (Git revision 77b980630c branch 'main') built on Fri Nov 12 15:50:52 UTC 2021 by vitess@buildkitsandbox using go1.17 linux/amd64
I1116 07:57:12.441947 1 healthcheck.go:262] loading tablets for cells: decontabodusseldorf
I1116 07:57:12.441979 1 healthcheck.go:282] Setting up healthcheck for cell: decontabodusseldorf
I1116 07:57:12.442342 1 flags.go:160] vtgate buffer enabled. PRIMARY requests will be buffered during detected failovers.
I1116 07:57:12.443038 1 gateway.go:103] Gateway waiting for serving tablets of types [PRIMARY REPLICA] ...
I1116 07:57:12.469031 1 healthcheck.go:324] Adding tablet to healthcheck: alias:{cell:"decontabodusseldorf" uid:1009888160} hostname:"10.42.1.183" port_map:{key:"grpc" value:15999} port_map:{key:"vt" value:15000} keyspace:"ionescu" shard:"-" key_range:{} type:PRIMARY db_name_override:"vt_ionescu" mysql_hostname:"10.42.1.183" mysql_port:3306 primary_term_start_time:{seconds:1636748889 nanoseconds:620052460}
I1116 07:57:12.474901 1 tablet_health_check.go:111] HealthCheckUpdate(Serving State): tablet: decontabodusseldorf-1009888160 (10.42.1.183) serving false => true for ionescu/- (PRIMARY) reason: healthCheck update
I1116 07:57:42.444673 1 healthcheck.go:695] couldn't find tablets for target: keyspace:"ionescu" shard:"-" tablet_type:REPLICA cell:"decontabodusseldorf"
W1116 07:57:42.447100 1 gateway.go:116] Timeout waiting for all keyspaces / shards to have healthy tablets of types [PRIMARY REPLICA], may be in degraded mode
I1116 07:57:42.447687 1 vtgate.go:106] Transaction mode: 'MULTI'
I1116 07:57:42.463573 1 vschema_manager.go:102] Received vschema update
I1116 07:57:42.465909 1 vschema_manager.go:102] Received vschema update
I1116 07:57:42.466866 1 streamlog.go:158] Streaming logs from VTGate at /debug/querylog.
I1116 07:57:42.467501 1 grpc_server.go:159] Setting grpc max message size to 67108864
I1116 07:57:42.467660 1 grpc_server.go:330] Building interceptors with 0 unary interceptors and 0 stream interceptors
I1116 07:57:42.469327 1 auth_server_clientcert.go:39] Not configuring AuthServerClientCert because mysql_server_ssl_ca is empty
I1116 07:57:42.470047 1 statsd.go:71] statsdAddress is empty
I1116 07:57:42.470451 1 service_map.go:64] Registering vtgateservice for grpc, disable it with -grpc-vtgateservice service_map parameter
I1116 07:57:42.471212 1 auth_server_ldap.go:59] Not configuring AuthServerLdap because mysql_ldap_auth_config_file and mysql_ldap_auth_config_string are empty
I1116 07:57:42.473545 1 auth_server_vault.go:70] Not configuring AuthServerVault, as -mysql_auth_vault_addr is empty.
I1116 07:57:42.481345 1 grpc_server.go:232] Listening for gRPC calls on port 15999
I1116 07:57:42.482208 1 unix_socket.go:36] Not listening on socket file
E1116 08:01:43.506683 1 vtgate.go:542] |
thanks for sharing the exact query, will fix this and update on the issue |
@harshit-gangal please notify me via tag when you managed to add a fix for it and it was integrated in main. I will use the latest docker image for it and I will be able to test it. Thanks again for everything. 🙇♂️ |
@chreniuc the fix is merged, you can try now and let us know. |
@harshit-gangal I will test it, do you have a link where I can follow when the new I'm not sure if this build is generated once per day or for every commit on |
I do not have clarity on this topic cc: @deepthi |
@harshit-gangal I've noticed that a new build was made for Your MySQL connection id is 4
Server version: 5.7.9-vitess-13.0.0-SNAPSHOT Version: 13.0.0-SNAPSHOT (Git revision d6b22587e0 branch 'main') built on Fri Nov 19 08:22:31 UTC 2021 by vitess@buildkitsandbox using go1.17 linux/amd64 The I've tested, but now I've encountered another error: symbol s.INDEX_NAME not found in table or subquery E1119 08:55:09.344136 1 vtgate.go:553] Execute: symbol s.INDEX_NAME not found in table or subquery, request: map[BindVariables:map[vtg1:type:VARBINARY value:"ionescu" vtg10:type:VARBINARY value:"user_company" vtg11:type:VARBINARY value:"user" vtg12:type:VARBINARY value:"PRIMARY" vtg2:type:VARBINARY value:"company_invite_code" vtg3:type:VARBINARY value:"site_role" vtg4:type:VARBINARY value:"item" vtg5:type:VARBINARY value:"site_item_urgent" vtg6:type:VARBINARY value:"site_item_event" vtg7:type:VARBINARY value:"site_item" vtg8:type:VARBINARY value:"site" vtg9:type:VARBINARY value:"company"] Session:in_transaction:true shard_sessions:{target:{keyspace:"ionescu" shard:"-" tablet_type:PRIMARY} transaction_id:1637311473806207639 tablet_alias:{cell:"decontabodusseldorf" uid:1009888160}} autocommit:true target_string:"ionescu" options:{included_fields:ALL client_found_rows:true workload:OLTP} found_rows:6 row_count:-1 DDLStrategy:"direct" SessionUUID:"65ca253f-4916-11ec-be7e-5ec2bb1c4e0c" enable_system_settings:true Sql:
SELECT
`s`.*
FROM (
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'company_invite_code'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_role'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item_urgent'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item_event'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'user_company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`STATISTICS`
WHERE
`TABLE_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'user'
) `s`
LEFT JOIN (
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'company_invite_code'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_role'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item_urgent'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item_event'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'user_company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'user'
) `rc`
ON
`s`.`INDEX_NAME` = `rc`.`CONSTRAINT_NAME`
AND
`s`.`TABLE_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA`
WHERE
`s`.`INDEX_NAME` != 'PRIMARY'
AND
`rc`.`CONSTRAINT_NAME` IS NULL]
E1119 08:55:14.345330 1 throttled.go:77] Execute: skipped 1 log messages |
@harshit-gangal I also received a similar error for the following query: Maybe it will be easier to investigate if you have multiple queries. SELECT
`kcu`.`TABLE_SCHEMA`,
`kcu`.`TABLE_NAME`,
`kcu`.`CONSTRAINT_NAME`,
`kcu`.`COLUMN_NAME`,
`kcu`.`REFERENCED_TABLE_SCHEMA`,
`kcu`.`REFERENCED_TABLE_NAME`,
`kcu`.`REFERENCED_COLUMN_NAME`,
`rc`.`DELETE_RULE` `ON_DELETE`,
`rc`.`UPDATE_RULE` `ON_UPDATE`
FROM (
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'company_invite_code'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site_role'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site_item_urgent'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site_item_event'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site_item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'site'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'user_company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` `kcu`
WHERE
`kcu`.`TABLE_SCHEMA` = 'ionescu'
AND
`kcu`.`TABLE_NAME` = 'user'
) `kcu`
INNER JOIN (
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'company_invite_code'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_role'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item_urgent'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item_event'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site_item'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'site'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'user_company'
UNION
SELECT
*
FROM `INFORMATION_SCHEMA`.`REFERENTIAL_CONSTRAINTS`
WHERE
`CONSTRAINT_SCHEMA` = 'ionescu'
AND
`TABLE_NAME` = 'user'
) `rc`
ON
`rc`.`CONSTRAINT_SCHEMA` = `kcu`.`CONSTRAINT_SCHEMA`
AND
`rc`.`TABLE_NAME` = `kcu`.`TABLE_NAME`
AND
`rc`.`CONSTRAINT_NAME` = `kcu`.`CONSTRAINT_NAME`
|
Hi @harshit-gangal, any news on this? |
I could not take a look at it, I have been busy with other commitments. I will update here when I will pick this up. |
This should be working now.
@chreniuc If you could give this another try and report back, that would be great. Thanks! |
Hi @fooforge , I no longer have the setup, I switched to metal mariadb so I won't be able tot test this. But I did provide the queries above, if those work, this issue can be closed. |
I wanted to use typeorm with vitess, but I'm encountering multiple problems. One was fixed by this issue: #9139 (comment)
After that fix was integrated I've encountered another issue.
This is an introduction, it the same as from the previous issue:
When I start the app and it does those queries, the vtgate crashes and it logs the following:
I also noticed an error on the nodejs side:
Do you have any idea why this happens?
Here are the logs:
I'm using the
vitess/lite:latest
docker image.The text was updated successfully, but these errors were encountered: