Table is defined as:
CREATE TABLE `TABLE1` (
`PKEY` binary(20) NOT NULL,
`PID` int(10) unsigned NOT NULL,
PRIMARY KEY (`PKEY`,`PID`),
KEY `TABLE1PID` (`PID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
The insert command is (for example):
insert ignore into TABLE1 (PKEY,PID) values (UNHEX('deadbeefdeadbeef'),12341234);
It works perfectly fine connecting to the mysql directly, and fails with the following error when connected to the vtgate:
ERROR 1235 (HY000): vtgate:
http://9e8d17b3b26d:15001/: execInsertUnsharded: target: schema1.0.master, used tablet: test-100 (9e8d17b3b26d), vttablet: rpc error: code = Unimplemented desc = unsupported: cannot identify primary key of statement (CallerID: mysql_user)
The vttablet is running with no replication at all, a single mysql and vttablet.
/vt/bin/vttablet -topo_implementation zk2 -topo_global_server_address localhost:21811,localhost:21812,localhost:21813 -topo_global_root /vitess/global -log_dir /vt/vtdataroot/tmp -tablet-path test-0000000100 -tablet_hostname '' -init_keyspace schema1 -init_shard 0 -init_tablet_type replica -health_check_interval 5s -enable_replication_reporter -backup_storage_implementation file -file_backup_storage_root /vt/vtdataroot/backups -restore_from_backup -queryserver-config-query-timeout 30000 -queryserver-config-transaction-timeout 30000 -queryserver-config-max-result-size 1999999999 -queryserver-config-transaction-cap 3300 -port 15100 -grpc_port 16100 -service_map grpc-queryservice,grpc-tabletmanager,grpc-updatestream -pid_file /vt/vtdataroot/vt_0000000100/vttablet.pid -vtctld_addr
http://9e8d17b3b26d:15000/ -db-config-app-unixsocket /bigssd/percona56/mysql/mysql.sock -grpc_max_message_size 33554432
/vt/bin/vtgate -topo_implementation zk2 -topo_global_server_address localhost:21811,localhost:21812,localhost:21813 -topo_global_root /vitess/global -log_dir /vt/vtdataroot/tmp -port 15001 -grpc_port 15991 -mysql_server_port 15306 -mysql_server_socket_path /tmp/mysql.sock -mysql_auth_server_static_file ./mysql_auth_server_static_creds.json -cell test -cells_to_watch test -tablet_types_to_wait MASTER,REPLICA -gateway_implementation discoverygateway -service_map grpc-vtgateservice -pid_file /vt/vtdataroot/tmp/vtgate.pid
And this is the my.cnf:
[mysql]
max_allowed_packet = 8M
[mysqld]
sql_mode = STRICT_TRANS_TABLES
datadir=/bigssd/percona56/mysql
socket=/bigssd/percona56/mysql/mysql.sock
user=mysql
port = 3306
max_connections = 200
key_buffer = 1M
max_allowed_packet = 8M
# table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# thread_concurrency = 24
innodb_read_io_threads = 24
innodb_buffer_pool_size = 70G
innodb_buffer_pool_instances = 16
innodb_additional_mem_pool_size = 20M
innodb_io_capacity = 50000
innodb_checksums = 0
innodb_log_file_size = 2000M
innodb_log_buffer_size = 1024M
innodb_flush_log_at_trx_commit = 0
innodb_file_format=Barracuda
bulk_insert_buffer_size=16M
innodb_file_per_table
transaction-isolation = READ-UNCOMMITTED
tmpdir = /bigssd/tmp
secure-file-priv = ""
performance_schema = off
server-id = 1810861327
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=1
[mysqld_safe]
thp-setting=never
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid