dolthub / dolthub/dolt

the row result is not printed when there is `IF` clause used in the stored procedure when using sql server

Closed
#6,918 0 comments 0 reactions 1 assignee Claimed by @zachmu View on GitHub
bug sql sql server
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

Cause of the issue: the current `IfElseBlock{}.Schema()` method returns `nil`, which is used to send the field information over the wire.
Repro in Dolt:
```
mysql> CREATE PROCEDURE p() IF 0 = 0 THEN SELECT 1; END IF#
Query OK, 0 rows affected (0.02 sec)

mysql> CALL p#
Query OK, 1 row affected (0.00 sec)

```

MySQL:
```
mysql> CREATE PROCEDURE p() IF 0 = 0 THEN SELECT 1; END IF#
Query OK, 0 rows affected (0.00 sec)

mysql> CALL p;
-> #
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.