Skip to content

Commit 1b87c86

Browse files
parser: Fix EncFirstFreeFlagBit (#19)
This commit fixes the FirstFreeFlagBit position to ensure proper offset for tree.FmtFlags.
1 parent b03514a commit 1b87c86

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
diff --git a/pkg/sql/lexbase/encode.go b/pkg/sql/lexbase/encode.go
2+
index 47b9a37..4f7bc03 100644
3+
--- a/pkg/sql/lexbase/encode.go
4+
+++ b/pkg/sql/lexbase/encode.go
5+
@@ -46,14 +46,14 @@ const (
6+
// without wrapping quotes.
7+
EncBareReservedKeywords
8+
9+
- // EncFirstFreeFlagBit needs to remain unused; it is used as base
10+
- // bit offset for tree.FmtFlags.
11+
- EncFirstFreeFlagBit
12+
-
13+
// EncAlwaysQuoted makes sure the string is always wrapped with quotes.
14+
// This is used only to construct a statement against Oracle source,
15+
// as Oracle is case insensitive if object name is not quoted.
16+
EncAlwaysQuoted
17+
+
18+
+ // EncFirstFreeFlagBit needs to remain unused; it is used as base
19+
+ // bit offset for tree.FmtFlags.
20+
+ EncFirstFreeFlagBit
21+
)
22+
23+
// EncodeRestrictedSQLIdent writes the identifier in s to buf. The

pkg/sql/lexbase/encode.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ const (
4646
// without wrapping quotes.
4747
EncBareReservedKeywords
4848

49-
// EncFirstFreeFlagBit needs to remain unused; it is used as base
50-
// bit offset for tree.FmtFlags.
51-
EncFirstFreeFlagBit
52-
5349
// EncAlwaysQuoted makes sure the string is always wrapped with quotes.
5450
// This is used only to construct a statement against Oracle source,
5551
// as Oracle is case insensitive if object name is not quoted.
5652
EncAlwaysQuoted
53+
54+
// EncFirstFreeFlagBit needs to remain unused; it is used as base
55+
// bit offset for tree.FmtFlags.
56+
EncFirstFreeFlagBit
5757
)
5858

5959
// EncodeRestrictedSQLIdent writes the identifier in s to buf. The

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
259c8a573eb2ba28643ffd55ee3bf6a438198c04
1+
4822ed2001ffba40aa96839344ffffad92020a2e

0 commit comments

Comments
 (0)