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

Not supported event type in CQN when shutdown and startup database #102

Closed
kubo opened this issue Mar 6, 2019 · 3 comments
Closed

Not supported event type in CQN when shutdown and startup database #102

kubo opened this issue Mar 6, 2019 · 3 comments
Labels

Comments

@kubo
Copy link

kubo commented Mar 6, 2019

I ran TestCQN under the sample directory. When I shutted down and started up the database, it printed ERROR: DPI-1013: not supported (dpiSubscr__callback: event type).

Here is the output.

$ pwd
/home/kubo/odpi/samples
$ LD_LIBRARY_PATH=../lib ./build/TestCQN  # shutdown and startup the database in another terminal
Registered query with id 101

In another session, modify the results of the query

select * from TestTempTable

Use Ctrl-C to terminate or wait for 100 seconds
Waiting for notifications...
Waiting for notifications...
ERROR: DPI-1013: not supported (dpiSubscr__callback: event type)
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
ERROR: DPI-1013: not supported (dpiSubscr__callback: event type)
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Waiting for notifications...
Done.

The values of message->eventType were 'DPI_EVENT_SHUTDOWNandDPI_EVENT_STARTUP` when DPI-1013 errors were reported.

The following code should be added just next of this line

        case DPI_EVENT_STARTUP:
        case DPI_EVENT_SHUTDOWN:
        case DPI_EVENT_SHUTDOWN_ANY:
            break;

ODPI-C version: The latest in the github repository.
Oracle version: Oracle 18.3
OS: Linux

@anthony-tuininga
Copy link
Member

Thanks, @kubo. That was helpful. I hadn't known how to generate those events so left them as unsupported. It clearly wan't that hard to generate those events after all! :-)

@kubo
Copy link
Author

kubo commented Mar 8, 2019

@anthony-tuininga Thanks. I confirmed that my unpublished rust-oracle driver caught shutdown and startup events.

@anthony-tuininga
Copy link
Member

Thanks, @kubo. Since the constants were already there and the code change was minimal I decided to consider this a bug and will include it in the patch I am about to release.

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

No branches or pull requests

2 participants