Comments (12)
Comment created by @beberlei:
Can you use the sql logger to find out how exactly that failing SQL statement looks like?
$em->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logger\EchoSQLLogger());
from dbal.
Comment created by hinikato:
Yes.
SELECT DISTINCT k.`CONSTRAINT*NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON k.`CONSTRAINT_NAME` = c.constraint_name AND c.constraint_name = k.constraint_name AND c.table_name = 'sessions' */ WHERE k.table_name = 'sessions' AND table_schema = 'myak' AND `REFERENCED_COLUMN*NAME` is not NULL
from dbal.
Comment created by hinikato:
Sorry, I have replaced the table name, but bug occurs with the 'sessions' table too.
from dbal.
Comment created by hinikato:
Hmm., but exception text says that table name is variables
, so this table looks like:
CREATE TABLE `variables` (
`name` varchar(128) NOT NULL DEFAULT '',
`value` longtext NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
from dbal.
Comment created by @beberlei:
But if the exception still references variables then the query from your comment cannot be the one that is failing.
from dbal.
Comment created by hinikato:
Do you want that bug will be ignored and Doctrine will be worse product?
SHOW FULL TABLES WHERE Table_type = "BASE TABLE"
DESCRIBE sessions
SELECT DISTINCT k.`CONSTRAINT*NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON k.`CONSTRAINT_NAME` = c.constraint_name AND c.constraint_name = k.constraint_name AND c.table_name = 'sessions' */ WHERE k.table_name = 'sessions' AND table_schema = 'myak' AND `REFERENCED_COLUMN*NAME` is not NULL
SHOW INDEX FROM sessions
DESCRIBE system
SELECT DISTINCT k.`CONSTRAINT*NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON k.`CONSTRAINT_NAME` = c.constraint_name AND c.constraint_name = k.constraint_name AND c.table_name = 'system' */ WHERE k.table_name = 'system' AND table_schema = 'myak' AND `REFERENCED_COLUMN*NAME` is not NULL
SHOW INDEX FROM system
DESCRIBE variables
SELECT DISTINCT k.`CONSTRAINT*NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON k.`CONSTRAINT_NAME` = c.constraint_name AND c.constraint_name = k.constraint_name AND c.table_name = 'variables' */ WHERE k.table_name = 'variables' AND table_schema = 'myak' AND `REFERENCED_COLUMN*NAME` is not NULL
exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1109 Unknown table 'variables' in information_schema' in X:\home\localhost\www\incubator\doctrine2\libraries\Doctrine\DBAL\Connection.php:568
Stack trace:
#0 X:\home\localhost\www\incubator\doctrine2\libraries\Doctrine\DBAL\Connection.php(568): PDO->query('SELECT DISTINCT...')
#1 X:\home\localhost\www\incubator\doctrine2\libraries\Doctrine\DBAL\Connection.php(524): Doctrine\DBAL\Connection->executeQuery('SELECT DISTINCT...', Array)
#2 X:\home\localhost\www\incubator\doctrine2\libraries\Doctrine\DBAL\Schema\AbstractSchemaManager.php(254): Doctrine\DBAL\Connection->fetchAll('SELECT DISTINCT...')
#3 X:\home\localhost\www\incubator\doctrine2\libraries\Doctrine\DBAL\Schema\AbstractSchemaManager.php(214): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableForeignKeys('variables')
#4 X:\home\localhost\www\incubator\doctrine2\libraries\Doctrine\DBAL\Schema\AbstractSchemaManager.php(199): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableDetails('variables')
#5 X:\home\localhost\www\incubator\doctrine2\libraries\Doctrine\ORM\Mapping\Driver\DatabaseDriver.php(155): Doctrine\DBAL\Schema\AbstractSchemaManager->listTables()
#6 X:\home\localhost\www\incubator\doctrine2\libraries\Doctrine\ORM\Mapping\ClassMetadataFactory.php(101): Doctrine\ORM\Mapping\Driver\DatabaseDriver->getAllClassNames()
#7 X:\home\localhost\www\incubator\doctrine2\index.php(57): Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata()
#8 {main}
from dbal.
Comment created by @beberlei:
Does it seem like me is ignoring this bug? Its not that I am payed to work on Doctrine and have no day-job.
This looks like a very good re-produce case though, i am looking into it (when i have time ;-))
from dbal.
Comment created by hinikato:
Benjamin, thank you!
from dbal.
Comment created by @beberlei:
I cannot reproduce this sorry, can you try again? i have changed that method for several other bugs lately, maybe it is fixed now?
from dbal.
Comment created by @beberlei:
Closed, no additional feedback given.
from dbal.
Issue was closed with resolution "Cannot Reproduce"
from dbal.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from dbal.
Related Issues (20)
- Column precision is not specified
- Support DuckDB HOT 1
- [API] Add getWrappedDriver method to AbstractDriverMiddleware HOT 2
- Doctrine\ORM\QueryBuilder::setParameter and ArrayParameterType in 4.0.0 HOT 2
- `SqliteSchemaManager` still emulates schema namespacing
- Custom driver and ExceptionConverter HOT 1
- PostgreSQL option gssencmode=disable isn't configurable HOT 4
- index-by and order-by do not work for abstract entities with inheritance type "JOINED" in many-to-many relations HOT 3
- Got error on SQLite database creation stage HOT 7
- Incorrect definition of table mysql.column_stats MariaDB OOM-kill HOT 3
- Mysqli Driver - Undesired Collations Cannot be Altered for `collation_connection` Variable
- Platform override HOT 4
- "dbal:run-sql command does not correctly output query results, shows '0 rows affected' instead" HOT 3
- PostgreSQLSchemaManager does not resolve single-quote quoting when retrieving schema information
- COLLATION_CHARACTER_SET_APPLICABILITY.COLLATION_NAME vs MariaDB FULL_COLLATION_NAME HOT 3
- Facing issue when trying to use old database (CORE PHP) with new symfony APP. HOT 1
- ❓ Is there a DBAL constant or similar to easily find which major version is installed? HOT 1
- Basic `UNION` support for the `QueryBuilder`
- [4.0] Query builder - how to reset `From` query part? HOT 9
- sql rename table :old_table to :new_table not working parameterised HOT 1
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 dbal.