SQLSTATE[42000]: Syntax error or access violation: 1305 - database

I've been using FuelPHP to develop a new web application.
Today, all of a sudden, errors started appearing when I try to add information to the database.
I can still retrieve information from the database so the login information must be correct. However when I try to add info I'm getting the following error message:
Error - 2012-08-06 15:48:37 --> Error - SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION dan_monline.LOWER does not exist with query: "SELECT LOWER (name) FROM countries WHERE name = 'costa rica'" in /home/danlucas/public_html/portfolio-dir/music-online/fuel/core/classes/database/pdo/connection.php on line 167
I'm not sure if this is a FuelPHP specific error or if it is MySQL that is causing the problem. From what I understand it's saying that 'LOWER' doesn't exist?
Has anyone seen this error before or know how to fix it?

Try again to remove the space after 'LOWER'.
--
SELECT LOWER(...

Fixed the problem by updating the mysql software.

Related

TYPO3 Exception: Could not determine pid

While trying to add a new fe_users record, on save I get
(1/1) Exception
Could not determine pid
It's TYPO3 9.5.20.
We already have a lot of entries in multiple folders which could be edited without problem.
But those records were imported (by EXT:ig_ldap_sso_auth or with mysql terminal)
These records are used only to be shown (no login is used).
What configuration is missing or could be wrong?
EDIT:
as #biesior mentioned: the error message does not come from the core but from an extension. It's EXT:solrfal (in version 7.0.0)
The real error was not in EXT:solrfal. this extension just hides the error with a misleading message.
The real reason was a wrong database configuration for the table fe_users. Although it is not possible in SQL to have a default value for fields of type text (and any given value is ignored) TYPO3 expects a default value if it is configured. As this is not returned from the database it assumes an error. And EXT:solrfal hooks into the error handling and assumes a wrong error.
Hi just got the same problem.
The error message was called in solrfal ConsistencyAspect::getRecordPageId() which was called by ConsistencyAspect::getDetectorsForSiteExclusiveRecord(). I remember that I have added various tablenames to siteExclusiveRecordTables of Extension Settings of solrfal. And yes, there was one table without pid. After removing this table from list, deleting files works again.

Snowflake error GsInstance with ID 222673 not in fdb

I got an error "Error - 390410: GsInstance with ID 222673 not in fdb" when trying to run a "CREATE OR REPLACE" command.
I guess that was a temporary issue because this hasn't occurred again, but what does this error mean? Did someone encounter this error and can please help me understand this?
Thanks!
I'd strongly recommend opening a support ticket if your queries are failing and error messages look like "Error - 390410: GsInstance with ID 222673 not in fdb", the ticket should include the Snowflake URL, the queryID of the command, etc... The more info you give support the more easily they can address the issue.
Getting your query_id can be done using either of the following:
via SQL commands:
https://docs.snowflake.com/en/sql-reference/functions/query_history.html
via the webUI:
https://docs.snowflake.com/en/user-guide/ui-history.html
I hope this helps...Rich

Getting error ExecuteReader: CommandText when running comments in query

I am getting an error when running a basic query and I cannot understand why.
It seems to be caused when comments are run by themselves.
Below are two query examples. The first gives no error, the second does.
Query 1:
print 'test'
-- test
Result 1:
test
Query 2:
print 'test'
go
-- test
Result 2:
test
An error occurred while executing batch. Error message is: ExecuteReader: CommandText property has not been initialized
My question is, why are comments returning this error and how can I fix this?
I found what causing the problem.
Issue was being caused because I was connected using "Additional Connection Parameters"
Column Encryption Setting = Enabled
This was also causing strange errors like repeated print messages.
When I removed this setting everything went back to normal.

Spring: Got error when initializing a database instance using Spring XML

Here is my XML snippet:
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="/WEB-INF/sqlscripts/age.sql" encoding="UTF-8" />
</jdbc:initialize-database>
When starting my Spring web application via Jetty, I got the following error:
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.jdbc.datasource.init.DataSourceInitializer#0': Invocation of init method failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Failed to execute database script; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement at line 1 of resource ServletContext resource [/WEB-INF/sqlscripts/age.sql]: I?N?S?E?R?T? ?A?g?e?G?r?o?u?p? ?(?d?e?f?a?u?l?t?O?p?t?i?o?n?,? ?d?e?s?c?r?i?p?t?i?o?n?,? ?d?i?s?p?l?a?y?S?o?r?t?,? ?n?a?m?e?,? ?c?o?d?e?,? ?l?o?c?a?l?e?)? ?V?A?L?U?E?S? ?(?1?,? ?N?U?L?L?,? ?1?,? ?N?'?1?6?-?2?0?'?,? ?N?'?1?6?-?2?0?'?,? ?N?'?e?n?_?U?S?'?)?
.....
com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'S'.
....
I don't know whether these question marks in the error message come from. The SQL statement in the age.sql has one line:
INSERT age(defaultOption, description, displaySort, name, code, locale) VALUES (1, NULL, 1, N'16-20', N'16-20', N'en_US');
I was able to run the same SQL statement successfully within MS SQL server manually. My SQL statement can have foreign characters.
I am using Spring 3.2.
What went wrong?
Thanks!
The file (example age.sql) having SQL inserts has encoding UTF-8 because it has characters of different languages. I changed it to UTF-8 No BOM. Then it worked.
Hope this helps someone else.

Load operation failed for query 'Login'. Base 64 string error

I had an error Load operation failed for query 'Login'. With details connected with Base 64 string error. It was on a fresh db, with single user.
If you have such an error on WebContext.Current.Authentication.Login(...), check if aspnet_Membership row for the user with error has proper values. In my case problem was PasswordSalt which was generated from MSSQL NEWID() - it wasn't proper PasswordSalt value.
Hope it can help someone :)

Resources