Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hi, I connected to a MySQL-Server via "create server CLASS 'MYSQLODBC' USING ''"

Then i created a external procedure. When i call "call test_procedure()" I got:

[MySQL][ODBC 5.2(a) Driver]Commandsout of sync;

you can't run this command now.

any ideas? Thanks Markus

asked 11 Jun '13, 07:44

Markus%20Koch's gravatar image

Markus Koch
31113
accept rate: 0%

edited 11 Jun '13, 09:13

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050

Google returns this hit, does it help?

http://bugs.mysql.com/bug.php?id=68280

(11 Jun '13, 09:15) Breck Carter

it works with Version 5.1 of the mysql odbc-driver, but not with 5.2?!?

(11 Jun '13, 09:23) Markus Koch
Replies hidden

Sorry, you did ask for "any ideas", and it wasn't clear that it worked before ( an important clue :)

(11 Jun '13, 11:37) Breck Carter

Hi Markus,

I tried reproducing this issue, but couldn't immediately do it with the MySQL 5.2.5 ODBC driver, against MySQL 5.5.28 in a very simple test. Here is what I tried doing:

(MySQL SQL)

delimiter $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `test_procedure`()
BEGIN
  SELECT 1;
END$$

(SQL Anywhere SQL)

create server "testmysql52" class 'MYSQLODBC' using 'DSN=test_mysql_52';
create externlogin "DBA" to "testmysql52" remote login 'root';
forward to "testmysql52" {SELECT version()};
forward to "testmysql52" {call test_procedure()};
create procedure "DBA"."test_procedure"() at 'testmysql52;test_schema;;test_procedure';
call test_procedure();

All of these statements worked correctly for me - can you do the same? If these statements are okay, can you provide your exact sequence of steps and definitions for your MySQL procedure in order to reproduce this issue? Is it 'just' this one procedure that doesn't work?

permanent link

answered 11 Jun '13, 11:27

Jeff%20Albion's gravatar image

Jeff Albion
10.8k171175
accept rate: 25%

edited 11 Jun '13, 11:28

i did exactly the same

if i call forward to "testmysql52" {call test_procedure()}; I works

but call test_procedure(); still returns: [MySQL][ODBC 5.2(a) Driver]Commands out of sync;

i'm using mysql 5.1.66

(11 Jun '13, 11:48) Markus Koch
Replies hidden

I also missed an obvious question in my original response: which version and build of SQL Anywhere are you using? I was testing with SQL Anywhere 16.0.0.1535.

(11 Jun '13, 12:08) Jeff Albion

with mysql-version 5.5.28 and odbc-version 5.2.5.0 i doesnt work on windows 32bit with asa 12.0.1.3873, too did you set any options in the odbc-settings?

(11 Jun '13, 12:24) Markus Koch
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×16

question asked: 11 Jun '13, 07:44

question was seen: 2,855 times

last updated: 11 Jun '13, 12:55