MySQL update trigger works but SELECT query does not see new data

369
April 10, 2017, at 11:31 AM

I have a MYSQL trigger that updates a table based upon the insert on another table. The updates are working correctly and I can see them from MYSQL workbench. However when performing the identical query from a koa/mysql2 javascript-based web server only old data shows up, not the new updated records. I am using MYSQL 5.7.17 (MyISAM) with a mysql2 Node NPM package ( 1.1.2 ) and KOA 1.2.4. The queries are really simple:

SELECT * FROM  db.tbl_update order by id DESC  LIMIT 0 , 20;

Here is my.ini

default-character-set=utf8
[mysqld]
port=3306
character-set-server=utf8
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
log-output=FILE
general-log=0
general_log_file="DESKTOP-NA514FK.log"
slow-query-log=1
slow_query_log_file="DESKTOP-NA514FK-slow.log"
long_query_time=10
log-bin="DESKTOP-NA514FK-bin"
log-error="DESKTOP-NA514FK.err"
server-id=1
secure-file-priv= 
max_connections=151
query_cache_size=0
table_open_cache=2000
tmp_table_size=98M
thread_cache_size=10
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=186M
key_buffer_size=8M
read_buffer_size=64K
read_rnd_buffer_size=256K
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M
innodb_buffer_pool_size=8M
innodb_log_file_size=48M
innodb_thread_concurrency=17
innodb_autoextend_increment=64
innodb_buffer_pool_instances=8
innodb_concurrency_tickets=5000
innodb_old_blocks_time=1000
innodb_open_files=300
innodb_stats_on_metadata=0
innodb_file_per_table=1
innodb_checksum_algorithm=0
back_log=80
flush_time=0
join_buffer_size=256K
max_allowed_packet=4M
max_connect_errors=100
open_files_limit=4161
query_cache_type=0
sort_buffer_size=256K
table_definition_cache=1400
binlog_row_event_max_size=8K
sync_master_info=10000
sync_relay_log=10000
sync_relay_log_info=10000
plugin_load="mysqlx"
loose_mysqlx_port=33060

Any help would be appreciated

Rent Charter Buses Company
READ ALSO
What is the difference between worker.kill vs process.exit in Node.JS

What is the difference between worker.kill vs process.exit in Node.JS

When using Nodejs's cluster feature, what is the difference between ending a forked process with process

317
FFmpeg stream dynamic png

FFmpeg stream dynamic png

I would like to know if its possible to stream a png or any kind of image using ffmpegI would like to generate the image contiously using nodejs that updates every 10 seconds

466
Setting up PayPal to run payments for Meteor app

Setting up PayPal to run payments for Meteor app

I have a question: How would I tokenize a credit card number in order to create necessary charges and subscriptions on the server in my Meteor app to be PCI compliant? I'm using Paypal's official paypal-node-sdk package

303
How to escape mysql special characters with sockets.io/node.js/javascript

How to escape mysql special characters with sockets.io/node.js/javascript

I am using socketsio to insert user-generated messages into MySQL, but I'm running into issues inserting records with an apostrophe

553