Comments (18)
Similar issue on my side:
CALL common_schema
.foreach
(
"SELECT table_schema FROM INFORMATION_SCHEMA.TABLES WHERE table_name = '<table_name>' ",
"UPDATE ${1}
.<table_name> set ...... WHERE id = ");
show warnings ;
Error Code: 1644 ;
Message : QueryScript error: [Unsupported token: "sleep-"] at 7: "UPDATE ... ";
MySQL version : Percona 5.6.23-72.1 -- no error ;
MySQL version : Percona 5.6.27-rel75 -- error ;
from common_schema.
Do you know what it might be ?
from common_schema.
I think we have the same error, see.
Do you have any suggestions @shlomi-noach?
from common_schema.
I've tested this in 5.7 and gotten similar errors.
Looking more closely at 5.6, I tested each version of community server between 5.6.22 and 5.6.27, and 5.6.27 was the first version that started throwing the error.
So it appears to be a change between 5.6.26 and 5.6.27 that broke QueryScript.
from common_schema.
I can also confirm:
master [localhost] {msandbox} (common_schema) > call run("foreach ($s: select TABLE_SCHEMA FROM INFORMATION_SCHEMA.TABLES WHERE table_name LIKE 'samplet') {select * from :${s}.samplet}" );
ERROR 1644 (91100): QueryScript error: [Unsupported token: "startet"] at 8: "foreach ($s: select TABLE_SCHEMA FROM INFORMATION_SCHEMA.TABLES WHERE t
master [localhost] {msandbox} (common_schema) > call run("foreach ($s: select TABLE_SCHEMA FROM INFORMATION_SCHEMA.TABLES WHERE table_name LIKE 'samplet') {select * from :${s}.samplet}" );
ERROR 1644 (91100): QueryScript error: [Unsupported token: "
I'm looking into this. I cannot see an obvious hint in http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-27.html
from common_schema.
master [localhost] {msandbox} (common_schema) > call run('select * from _sql_tokens');
ERROR 1644 (91100): QueryScript error: [Unsupported token: "startt"] at 7: "select * from _sql_tokens"
master [localhost] {msandbox} (common_schema) > call run('select * from _sql_tokens');
ERROR 1644 (91100): QueryScript error: [Unsupported token: "
from common_schema.
We're also experiencing the problem in mysql 5.5 (5.5.46)
from common_schema.
Seems like MySQL introduced a bug in local routine variables.
These variables:
declare first_token text;
declare first_state text;
Are assigned via:
SELECT level, token, state FROM _sql_tokens WHERE id = id_from INTO statement_level, first_token, first_state;
With these legit values, select
, alpha
(first row):
+-----------+------------+----+-------+-------+--------+------------+
| server_id | session_id | id | start | level | token | state |
+-----------+------------+----+-------+-------+--------+------------+
| 1 | 19 | 1 | 7 | 0 | select | alpha |
| 1 | 19 | 2 | 8 | 0 | | whitespace |
| 1 | 19 | 3 | 9 | 0 | 1 | integer |
| 1 | 19 | 4 | 9 | 0 | | start |
+-----------+------------+----+-------+-------+--------+------------+
and their values are immediately corrupted.
I'm looking to see whether I can overcome this bug, but it is very disconcerting as this coding style is all over the place.
from common_schema.
This seems to work around the problem:
SELECT level, token, state FROM _sql_tokens WHERE id = id_from INTO @_statement_level, @_first_token, @_first_state;
set statement_level=@_statement_level;
set first_token=@_first_token;
set first_state=@_first_state;
from common_schema.
O-M-G this is everywhere. This bug is creepy and happens on multiple occasions of SELECT... INTO <local-variable>
. I'm replacing all occurrences, but I'm doing so hastily at this time.
I will need to step back and do this orderly. Meanwhile I can throw in a hopefully mostly fixed deployment file.
from common_schema.
Please find new sql
file in https://github.com/shlomi-noach/common_schema/releases/tag/v2.3
from common_schema.
Thanks @shlomi-noach
from common_schema.
Is it confirmed the problem is solved on mentioned platforms?
from common_schema.
I can confirm that the problem is solved on all mentioned platforms that I tested. The one I did not test is MariaDB 1.0.22.
I tested the following versions:
MySQL Community Server 5.5.46
Percona Server 5.6.27
Percona Server 5.7.10-3
MySQL Community Server 5.7.11
I was able to install common_schema 2.3 on all of those versions with no errors, and I was able to successfully run the following QueryScript test:
call common_schema.run("
foreach ($t: select TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema = 'mysql')
{select count(*) from mysql.:${t} }
" );
from common_schema.
I can confirm installation works too. Thank you for the fix. One little thing I mentioned is weird symbols in sql-file of release. Take a look for instance on line 13466.
from common_schema.
Server version: 5.5.48-37.8 Percona Server (GPL), Release 37.8, Revision c8ae1b6
also works
from common_schema.
@genuss thanks - can you kindly open a new issue for the strange chars? Probably my mac's version of html2text
from common_schema.
thanks all, closing this issue
from common_schema.
Related Issues (14)
- describe/automate updating `gh-pages` after documentation is updated on `master`
- ERROR 1305 (42000): PROCEDURE *.run does not exist HOT 2
- Returns NULL, if the value is empty object/array
- json_to_xml returns NULL if text value begins with - HOT 2
- Escaped double quotes don't work in json_to_xml HOT 3
- How to build the project? HOT 8
- Risks page still mentions GPL licensing HOT 1
- ERROR 1171 (42000) at line 195: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead HOT 1
- MySql 8 Support HOT 1
- Broken characters in 2.3 release
- MySQL 5.7: Unknown column 'password' in 'field list' HOT 14
- Installation issues on Percona Server 5.6 HOT 1
- change urls from `code.google.com` to `github.com` in `doc/html/documentation.html`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from common_schema.