Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle DbSession problem #15708

Closed
sheillendra opened this issue Feb 20, 2018 · 8 comments
Closed

Oracle DbSession problem #15708

sheillendra opened this issue Feb 20, 2018 · 8 comments
Assignees
Milestone

Comments

@sheillendra
Copy link

After update yii2 to 2.0.14 version, I get error :

https://pastebin.com/2H0AquHH

In 2.0.13 version is running well.

What steps will reproduce the problem?

What is the expected result?

What do you get instead?

Additional info

Q A
Yii version 2.0.14
PHP version 7.1
Operating system Centos 7
Oracle Version 12.2
@yii-bot
Copy link

yii-bot commented Feb 20, 2018

Thanks for posting in our issue tracker.
In order to properly assist you, we need additional information:

  • When does the issue occur?
  • What do you see?
  • What was the expected result?
  • Can you supply us with a stacktrace? (optional)
  • Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)

Thanks!

This is an automated comment, triggered by adding the label status:need more info.

@samdark samdark added the Oracle label Feb 20, 2018
@samdark
Copy link
Member

samdark commented Feb 20, 2018

@sergeymakinen looks like upsert issue to me, is it?

@samdark samdark added the type:bug Bug label Feb 20, 2018
@sergeymakinen
Copy link
Member

Yes, I suspect it’s about upsert.

@SilverFire
Copy link
Member

See PR #15762

@sheillendra could you check, whether the Pull Request fixes the problem?

@SilverFire
Copy link
Member

Fixed by #15764

SilverFire added a commit that referenced this issue Feb 24, 2018
Fixed yii\db\Command::upsert() for Cubrid/MSSQL/Oracle (fixes #15708)
@sheillendra
Copy link
Author

@SilverFire error still occurs in version 2.0.14.2 hotfix.

Next yii\db\Exception: SQLSTATE[HY000]: General error: 1465 [Oracle][ODBC][Ora]ORA-01465: invalid hex number
(SQLExecute[1465] at /builddir/build/BUILD/php-7.1.14/ext/pdo_odbc/odbc_stmt.c:260)
The SQL being executed was: MERGE INTO "prod_session" USING (SELECT '__flash|a:0:{}' AS "data", '2198f890f89f49d973d615af0c0c26d3' AS "id", 1520992947 AS "expire" FROM "DUAL") "EXCLUDED" ON ("prod_session"."id"="EXCLUDED"."id") WHEN MATCHED THEN UPDATE SET "data"="EXCLUDED"."data", "expire"="EXCLUDED"."expire" WHEN NOT MATCHED THEN INSERT ("data", "id", "expire") VALUES ("EXCLUDED"."data", "EXCLUDED"."id", "EXCLUDED"."expire") in /home/ec2-user/html/vendor/yiisoft/yii2/db/Schema.php:664
Stack trace:
#0 /home/ec2-user/html/vendor/yiisoft/yii2/db/Command.php(1263): yii\db\Schema->convertException(Object(PDOException), 'MERGE INTO "pro...')
#1 /home/ec2-user/html/vendor/yiisoft/yii2/db/Command.php(1075): yii\db\Command->internalExecute('MERGE INTO "pro...')
#2 /home/ec2-user/html/vendor/yiisoft/yii2/web/DbSession.php(174): yii\db\Command->execute()
#3 [internal function]: yii\web\DbSession->writeSession('2198f890f89f49d...', '__flash|a:0:{}')
#4 /home/ec2-user/html/vendor/yiisoft/yii2/web/Session.php(302): session_regenerate_id(false)
#5 /home/ec2-user/html/vendor/yiisoft/yii2/web/DbSession.php(105): yii\web\Session->regenerateID(false)
#6 /home/ec2-user/html/vendor/yiisoft/yii2/web/User.php(651): yii\web\DbSession->regenerateID(true)
#7 /home/ec2-user/html/vendor/yiisoft/yii2/web/User.php(252): yii\web\User->switchIdentity(Object(common\models\UserCrud), 2592000)
#8 /home/ec2-user/html/backend/models/LoginForm.php(64): yii\web\User->login(Object(common\models\UserCrud), 2592000)
#9 /home/ec2-user/html/backend/controllers/SiteController.php(76): backend\models\LoginForm->login('admingroup')
#10 [internal function]: backend\controllers\SiteController->actionLogin()
#11 /home/ec2-user/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /home/ec2-user/html/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)

@SilverFire SilverFire reopened this Mar 14, 2018
@SilverFire
Copy link
Member

What is the expected SQL?

@SilverFire
Copy link
Member

// Open a new issue, please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants